Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie] Mała przeróbka kodu moda


BaronQ™

Rekomendowane odpowiedzi

Opublikowano

Witam. Mam x-raya pod wersję 1.6.4. Można w nim dodawać do wyświetlania własne bloki. Niestety tylko bloki o id od 1 do 4096 oraz bez metadany (chyba tak to się nazywa, np. 56:4). Moglibyście mi zmienić ten kod tak aby dało się dodać tą metadane i większą liczbę tych id?

Kod:

mod_Xray:

 

 

package de.Xray;

import java.util.ArrayList;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.src.BaseMod;
import net.minecraft.src.MLProp;
import net.minecraft.src.ModLoader;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.EventBus;
import net.minecraftforge.event.ForgeSubscribe;
import org.lwjgl.opengl.GL11;

public class mod_Xray
  extends BaseMod
{
  @MLProp(name="toggleXray", info="Toggle toggleXray enabled on start-up?")
  public static boolean toggleXray = false;
  @MLProp(name="radius", info="Radius for X-ray")
  public static int radius = 45;
  private KeyBinding toggleXrayBinding;
  private KeyBinding toggleXrayGui;
  public static int displayListid = 0;
  public static int cooldownTicks = 0;
  private Minecraft mc;
  
  public String getVersion()
  {
    return "MX for 1.6.2";
  }
  
  public void load()
  {
    this.mc = Minecraft.func_71410_x();
    this.toggleXrayBinding = new KeyBinding("key.toggleOrHoldForXray", 45);
    ModLoader.registerKey(this, this.toggleXrayBinding, false);
    ModLoader.addLocalization("key.toggleOrHoldForXray", "Toggle Xray");
    this.toggleXrayGui = new KeyBinding("key.toggleXrayGui", 64);
    ModLoader.registerKey(this, this.toggleXrayGui, false);
    ModLoader.addLocalization("key.toggleXrayGui", "Toggle Xray-Gui");
    MinecraftForge.EVENT_BUS.register(this);
    ModLoader.setInGameHook(this, true, false);
    displayListid = GL11.glGenLists(1);
    xrayBlocks.init();
  }
  
  public boolean onTickInGame(float f, Minecraft mc)
  {
    if (!toggleXray) {
      return true;
    }
    if (cooldownTicks < 1)
    {
      compileDL();
      cooldownTicks = 80;
    }
    cooldownTicks -= 1;
    return true;
  }
  
  private void compileDL()
  {
    GL11.glDeleteLists(displayListid, 1);
    GL11.glNewList(displayListid, 4864);
    
    GL11.glDisable(3553);
    GL11.glDisable(2929);
    
    GL11.glColor3ub((byte)-1, (byte)0, (byte)0);
    GL11.glBegin(1);
    WorldClient world = this.mc.field_71441_e;
    EntityClientPlayerMP player = this.mc.field_71439_g;
    for (int i = 0; i < radius * 2; i++) {
      for (int j = 0; j < radius * 2; j++) {
        for (int k = 0; k < 100; k++)
        {
          int bId = world.func_72798_a(i - radius + (int)player.field_70165_t, k, j - radius + (int)player.field_70161_v);
          if (bId != 0) {
            for (int o = 0; o < xrayBlocks.blocks.size(); o++) {
              if (((xrayBlocks)xrayBlocks.blocks.get(o)).id == bId) {
                renderBlock(i - radius + (int)player.field_70165_t, k, j - radius + (int)player.field_70161_v, o);
              }
            }
          }
        }
      }
    }
    GL11.glEnd();
    GL11.glEnable(2929);
    GL11.glEnable(3553);
    GL11.glEndList();
  }
  
  private void renderBlock(int x, int y, int z, int id)
  {
    xrayBlocks color = (xrayBlocks)xrayBlocks.blocks.get(id);
    GL11.glColor3ub((byte)color.r, (byte)color.g, (byte)color.;
    
    GL11.glVertex3f(x, y, z);
    GL11.glVertex3f(x + 1, y, z);
    
    GL11.glVertex3f(x + 1, y, z);
    GL11.glVertex3f(x + 1, y, z + 1);
    
    GL11.glVertex3f(x, y, z);
    GL11.glVertex3f(x, y, z + 1);
    
    GL11.glVertex3f(x, y, z + 1);
    GL11.glVertex3f(x + 1, y, z + 1);
    
    GL11.glVertex3f(x, y + 1, z);
    GL11.glVertex3f(x + 1, y + 1, z);
    
    GL11.glVertex3f(x + 1, y + 1, z);
    GL11.glVertex3f(x + 1, y + 1, z + 1);
    
    GL11.glVertex3f(x, y + 1, z);
    GL11.glVertex3f(x, y + 1, z + 1);
    
    GL11.glVertex3f(x, y + 1, z + 1);
    GL11.glVertex3f(x + 1, y + 1, z + 1);
    
    GL11.glVertex3f(x, y, z);
    GL11.glVertex3f(x, y + 1, z);
    
    GL11.glVertex3f(x, y, z + 1);
    GL11.glVertex3f(x, y + 1, z + 1);
    
    GL11.glVertex3f(x + 1, y, z);
    GL11.glVertex3f(x + 1, y + 1, z);
    
    GL11.glVertex3f(x + 1, y, z + 1);
    GL11.glVertex3f(x + 1, y + 1, z + 1);
  }
  
  public void keyboardEvent(KeyBinding key)
  {
    if (!(this.mc.field_71462_r instanceof GuiScreen))
    {
      if (key.field_74512_d == this.toggleXrayBinding.field_74512_d)
      {
        toggleXray = !toggleXray;
        if (toggleXray) {
          cooldownTicks = 0;
        } else {
          GL11.glDeleteLists(displayListid, 1);
        }
      }
      if (key.field_74512_d == this.toggleXrayGui.field_74512_d) {
        xray_Gui.show();
      }
    }
  }
  
  @ForgeSubscribe
  public void renderWorldLastEvent(RenderWorldLastEvent evt)
  {
    if (!toggleXray) {
      return;
    }
    double doubleX = this.mc.field_71439_g.field_70142_S + (this.mc.field_71439_g.field_70165_t - this.mc.field_71439_g.field_70142_S) * evt.partialTicks;
    

    double doubleY = this.mc.field_71439_g.field_70137_T + (this.mc.field_71439_g.field_70163_u - this.mc.field_71439_g.field_70137_T) * evt.partialTicks;
    

    double doubleZ = this.mc.field_71439_g.field_70136_U + (this.mc.field_71439_g.field_70161_v - this.mc.field_71439_g.field_70136_U) * evt.partialTicks;
    

    GL11.glPushMatrix();
    GL11.glTranslated(-doubleX, -doubleY, -doubleZ);
    GL11.glCallList(displayListid);
    GL11.glPopMatrix();
  }
}
 

 

 

xrayBlocks

 

 

package de.Xray;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;

public class xrayBlocks
{
  public static ArrayList<xrayBlocks> blocks = new ArrayList();
  public int r;
  public int g;
  public int b;
  public int id;
  
  public xrayBlocks() {}
  
  public xrayBlocks(int r, int g, int b, int id)
  {
    this.r = r;
    this.g = g;
    this.b = b;
    this.id = id;
  }
  
  public String toString()
  {
    return this.r + " " + this.g + " " + this.b + " " + this.id;
  }
  
  public static xrayBlocks fromString(String s)
  {
    xrayBlocks result = new xrayBlocks();
    String[] info = s.split(" ");
    result.r = Integer.parseInt(info[0]);
    result.g = Integer.parseInt(info[1]);
    result.b = Integer.parseInt(info[2]);
    result.id = Integer.parseInt(info[3]);
    return result;
  }
  
  public static void setStandardList()
  {
    ArrayList<xrayBlocks> block = new ArrayList();
    block.add(new xrayBlocks(0, 0, 128, Block.field_71947_N.field_71990_ca));
    block.add(new xrayBlocks(255, 0, 0, Block.field_72047_aN.field_71990_ca));
    block.add(new xrayBlocks(102, 0, 0, Block.field_71949_H.field_71990_ca));
    block.add(new xrayBlocks(255, 255, 0, Block.field_71941_G.field_71990_ca));
    block.add(new xrayBlocks(0, 255, 0, Block.field_72068_bR.field_71990_ca));
    block.add(new xrayBlocks(0, 191, 255, Block.field_72073_aw.field_71990_ca));
    
    blocks = block;
    try
    {
      save();
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
  }
  
  public static void removeInvalidBlocks()
  {
    for (int i = 0; i < blocks.size(); i++)
    {
      xrayBlocks block = (xrayBlocks)blocks.get(i);
      if ((block.id > 4096) || (block.id <= 0) || (Block.field_71973_m[block.id] == null)) {
        blocks.remove(block);
      }
    }
  }
  
  public static void init()
  {
    try
    {
      
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
    removeInvalidBlocks();
    if (blocks.size() == 0) {
      setStandardList();
    }
  }
  
  private static void load()
    throws IOException
  {
    File toLoad = new File(Minecraft.func_71410_x().field_71412_D, "xrayBlocks.dat");
    if ((toLoad.exists()) && (!toLoad.isDirectory()))
    {
      ArrayList<xrayBlocks> block = new ArrayList();
      BufferedReader br = new BufferedReader(new FileReader(toLoad));
      String s;
      while ((s = br.readLine()) != null) {
        block.add(fromString(s));
      }
      br.close();
      blocks = block;
    }
  }
  
  static void save()
    throws IOException
  {
    File toSave = new File(Minecraft.func_71410_x().field_71412_D, "xrayBlocks.dat");
    if (toSave.exists()) {
      toSave.delete();
    }
    BufferedWriter bw = new BufferedWriter(new FileWriter(toSave));
    for (int i = 0; i < blocks.size(); i++)
    {
      bw.write(((xrayBlocks)blocks.get(i)).toString());
      bw.newLine();
    }
    bw.flush();
    bw.close();
  }
}
 

 

 

xrayBlock_Slot

 

 

package de.Xray;

import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiSlot;
import net.minecraft.client.renderer.Tessellator;

public class xrayBlock_Slot
  extends GuiSlot
{
  int selectedIndex = -1;
  xray_Gui xrayGui;
  
  public xrayBlock_Slot(Minecraft par1Minecraft, int width, int height, int top, int bottom, int slotHeight, xray_Gui xrayGui)
  {
    super(par1Minecraft, width, height, top, bottom, slotHeight);
    this.xrayGui = xrayGui;
    xrayBlocks.init();
  }
  
  protected int func_77217_a()
  {
    return xrayBlocks.blocks.size();
  }
  
  protected void func_77213_a(int i, boolean flag)
  {
    this.selectedIndex = i;
  }
  
  protected boolean func_77218_a(int i)
  {
    return i == this.selectedIndex;
  }
  
  protected void func_77221_c() {}
  
  protected void func_77214_a(int i, int j, int k, int l, Tessellator tessellator)
  {
    xrayBlocks xblock = (xrayBlocks)xrayBlocks.blocks.get(i);
    xray_Gui.func_73734_a(175 + j, 1 + k, this.xrayGui.field_73880_f - j - 20, 15 + k, ((0xC800 | xblock.r) << 8 | xblock.g) << 8 | xblock.;
    this.xrayGui.func_73731_b(Minecraft.func_71410_x().field_71466_p, Block.field_71973_m[xblock.id].func_71931_t(), j + 2, k + 1, 16777215);
  }
}
 

 

 

xray_AddGui

 

 

package de.Xray;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;

public class xray_AddGui
  extends GuiScreen
{
  int r;
  int g;
  int b;
  int id;
  GuiTextField ID;
  GuiTextField colorR;
  GuiTextField colorG;
  GuiTextField colorB;
  GuiButton add;
  GuiButton cancel;
  private int selectedIndex = -1;
  
  public xray_AddGui(int r, int g, int b, int id, int index)
  {
    this.r = r;
    this.g = g;
    this.b = b;
    this.id = id;
    this.selectedIndex = index;
  }
  
  public xray_AddGui() {}
  
  public xray_AddGui(xrayBlocks xrayBlocks, int index)
  {
    this(xrayBlocks.r, xrayBlocks.g, xrayBlocks.b, xrayBlocks.id, index);
  }
  
  protected void func_73875_a(GuiButton par1GuiButton)
  {
    if (par1GuiButton.field_73741_f == 0)
    {
      if (this.selectedIndex != -1) {
        xrayBlocks.blocks.remove(this.selectedIndex);
      }
      xrayBlocks.blocks.add(new xrayBlocks(this.r, this.g, this.b, this.id));
      try
      {
        xrayBlocks.save();
      }
      catch (IOException e)
      {
        e.printStackTrace();
      }
      this.field_73882_e.func_71373_a(new xray_Gui());
    }
    else if (par1GuiButton.field_73741_f == 1)
    {
      this.field_73882_e.func_71373_a(new xray_Gui());
    }
    super.func_73875_a(par1GuiButton);
  }
  
  public void func_73866_w_()
  {
    super.func_73866_w_();
    this.add = new GuiButton(0, this.field_73880_f / 2 - 42, this.field_73881_g - 22, 40, 20, "Add");
    this.cancel = new GuiButton(1, this.field_73880_f / 2 + 42, this.field_73881_g - 22, 40, 20, "Cancel");
    this.ID = new GuiTextField(this.field_73882_e.field_71466_p, this.field_73880_f / 2, this.field_73881_g / 10, 60, 20);
    this.ID.func_73782_a(Integer.valueOf(this.id).toString());
    this.ID.func_73804_f(4);
    this.colorR = new GuiTextField(this.field_73882_e.field_71466_p, this.field_73880_f / 2, this.field_73881_g / 10 * 3, 60, 20);
    
    this.colorR.func_73782_a(Integer.valueOf(this.r).toString());
    this.colorR.func_73804_f(3);
    this.colorG = new GuiTextField(this.field_73882_e.field_71466_p, this.field_73880_f / 2, this.field_73881_g / 10 * 5, 60, 20);
    
    this.colorG.func_73782_a(Integer.valueOf(this.g).toString());
    this.colorG.func_73804_f(3);
    this.colorB = new GuiTextField(this.field_73882_e.field_71466_p, this.field_73880_f / 2, this.field_73881_g / 10 * 7, 60, 20);
    
    this.colorB.func_73782_a(Integer.valueOf(this..toString());
    this.colorB.func_73804_f(3);
    this.field_73887_h.add(this.add);
    this.field_73887_h.add(this.cancel);
  }
  
  public void func_73863_a(int par1, int par2, float par3)
  {
    func_73871_c(0);
    this.ID.func_73795_f();
    this.colorR.func_73795_f();
    this.colorG.func_73795_f();
    this.colorB.func_73795_f();
    this.add.field_73742_g = drawErrors();
    drawInfo();
    func_73734_a(0, this.field_73881_g - 50, 50, this.field_73881_g, ((0xDC00 | this.r) << 8 | this.g) << 8 | this.;
    
    super.func_73863_a(par1, par2, par3);
  }
  
  private void drawInfo()
  {
    func_73731_b(this.field_73882_e.field_71466_p, "ID (1-4095)", 40, this.field_73881_g / 10 + 5, 16777215);
    
    func_73731_b(this.field_73882_e.field_71466_p, "Red-Value of the Color(0-255)", 40, this.field_73881_g / 10 * 3 + 5, 16777215);
    
    func_73731_b(this.field_73882_e.field_71466_p, "Green-Value of the Color(0-255)", 40, this.field_73881_g / 10 * 5 + 5, 16777215);
    
    func_73731_b(this.field_73882_e.field_71466_p, "Blue-Value of the Color(0-255)", 40, this.field_73881_g / 10 * 7 + 5, 16777215);
  }
  
  private boolean drawErrors()
  {
    boolean flag = true;
    
    String ids = this.ID.func_73781_b();
    String rs = this.colorR.func_73781_b();
    String gs = this.colorG.func_73781_b();
    String bs = this.colorB.func_73781_b();
    if (ids.equals(""))
    {
      func_73731_b(this.field_73882_e.field_71466_p, "Field is Empty", this.field_73880_f / 2 + 70, this.field_73881_g / 10 + 5, 16711680);
      
      flag = false;
    }
    else
    {
      try
      {
        this.id = Integer.parseInt(ids);
        if ((this.id <= 0) || (this.id > 4095))
        {
          func_73731_b(this.field_73882_e.field_71466_p, "Invalid ID", this.field_73880_f / 2 + 70, this.field_73881_g / 10 + 5, 16711680);
          
          flag = false;
        }
        else if (Block.field_71973_m[this.id] != null)
        {
          func_73731_b(this.field_73882_e.field_71466_p, "Name: " + Block.field_71973_m[this.id].func_71931_t(), this.field_73880_f / 2 + 70, this.field_73881_g / 10 + 5, 65280);
        }
        else
        {
          func_73731_b(this.field_73882_e.field_71466_p, "No Block with that ID", this.field_73880_f / 2 + 70, this.field_73881_g / 10 + 5, 16711680);
          
          flag = false;
        }
      }
      catch (NumberFormatException e)
      {
        func_73731_b(this.field_73882_e.field_71466_p, "Fieldcontent is not a number", this.field_73880_f / 2 + 70, this.field_73881_g / 10 + 5, 16711680);
        
        flag = false;
      }
    }
    if (rs.equals(""))
    {
      func_73731_b(this.field_73882_e.field_71466_p, "Field is Empty", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 3 + 5, 16711680);
      
      flag = false;
    }
    else
    {
      try
      {
        this.r = Integer.parseInt(rs);
        if ((this.r < 0) || (this.r > 255))
        {
          func_73731_b(this.field_73882_e.field_71466_p, "Invalid ID", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 3 + 5, 16711680);
          
          flag = false;
        }
      }
      catch (NumberFormatException e)
      {
        func_73731_b(this.field_73882_e.field_71466_p, "Fieldcontent is not a number", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 3 + 5, 16711680);
        
        flag = false;
      }
    }
    if (gs.equals(""))
    {
      func_73731_b(this.field_73882_e.field_71466_p, "Field is Empty", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 5 + 5, 16711680);
      
      flag = false;
    }
    else
    {
      try
      {
        this.g = Integer.parseInt(gs);
        if ((this.g < 0) || (this.g > 255))
        {
          func_73731_b(this.field_73882_e.field_71466_p, "Invalid ID", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 5 + 5, 16711680);
          
          flag = false;
        }
      }
      catch (NumberFormatException e)
      {
        func_73731_b(this.field_73882_e.field_71466_p, "Fieldcontent is not a number", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 5 + 5, 16711680);
        
        flag = false;
      }
    }
    if (bs.equals(""))
    {
      func_73731_b(this.field_73882_e.field_71466_p, "Field is Empty", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 7 + 5, 16711680);
      
      flag = false;
    }
    else
    {
      try
      {
        this.b = Integer.parseInt(bs);
        if ((this.b < 0) || (this.b > 255))
        {
          func_73731_b(this.field_73882_e.field_71466_p, "Invalid ID", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 7 + 5, 16711680);
          
          flag = false;
        }
      }
      catch (NumberFormatException e)
      {
        func_73731_b(this.field_73882_e.field_71466_p, "Fieldcontent is not a number", this.field_73880_f / 2 + 70, this.field_73881_g / 10 * 7 + 5, 16711680);
        
        flag = false;
      }
    }
    return flag;
  }
  
  public void func_73876_c()
  {
    this.ID.func_73780_a();
    this.colorR.func_73780_a();
    this.colorG.func_73780_a();
    this.colorB.func_73780_a();
  }
  
  protected void func_73869_a(char par1, int par2)
  {
    this.ID.func_73802_a(par1, par2);
    this.colorR.func_73802_a(par1, par2);
    this.colorG.func_73802_a(par1, par2);
    this.colorB.func_73802_a(par1, par2);
  }
  
  protected void func_73864_a(int par1, int par2, int par3)
  {
    super.func_73864_a(par1, par2, par3);
    this.ID.func_73793_a(par1, par2, par3);
    this.colorR.func_73793_a(par1, par2, par3);
    this.colorG.func_73793_a(par1, par2, par3);
    this.colorB.func_73793_a(par1, par2, par3);
  }
}
 

 

 

xray_Gui

 

 

package de.Xray;


import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;


public class xray_Gui
  extends GuiScreen
{
  xrayBlock_Slot slot;
  GuiButton add;
  GuiButton del;
  GuiButton edit;
  GuiButton exit;
  
  public static void show()
  {
    Minecraft.func_71410_x().func_71373_a(new xray_Gui());
  }
  
  public static void close()
  {
    Minecraft.func_71410_x().func_71373_a(null);
  }
  
  public void func_73866_w_()
  {
    super.func_73866_w_();
    
    this.slot = new xrayBlock_Slot(this.field_73882_e, this.field_73880_f, this.field_73881_g, 25, this.field_73881_g - 25, 20, this);
    this.add = new GuiButton(0, this.field_73880_f / 9, this.field_73881_g - 22, 70, 20, "Add Block");
    this.del = new GuiButton(1, this.field_73880_f / 9 * 3, this.field_73881_g - 22, 70, 20, "Delete Block");
    
    this.del.field_73742_g = false;
    this.edit = new GuiButton(2, this.field_73880_f / 9 * 5, this.field_73881_g - 22, 70, 20, "Edit Block");
    
    this.edit.field_73742_g = false;
    this.exit = new GuiButton(3, this.field_73880_f / 9 * 7, this.field_73881_g - 22, 70, 20, "Exit");
    this.field_73887_h.add(this.add);
    this.field_73887_h.add(this.del);
    this.field_73887_h.add(this.edit);
    this.field_73887_h.add(this.exit);
  }
  
  public void func_73863_a(int par1, int par2, float par3)
  {
    this.slot.func_77211_a(par1, par2, par3);
    super.func_73863_a(par1, par2, par3);
    if (this.slot.selectedIndex != -1)
    {
      this.del.field_73742_g = true;
      this.edit.field_73742_g = true;
    }
    else
    {
      this.del.field_73742_g = false;
      this.edit.field_73742_g = false;
    }
  }
  
  protected void func_73875_a(GuiButton par1GuiButton)
  {
    switch (par1GuiButton.field_73741_f)
    {
    case 0: 
      this.field_73882_e.func_71373_a(new xray_AddGui());
      break;
    case 1: 
      xrayBlocks.blocks.remove(this.slot.selectedIndex);
      this.slot.selectedIndex = -1;
      try
      {
        xrayBlocks.save();
      }
      catch (IOException e)
      {
        e.printStackTrace();
      }
    case 2: 
      this.field_73882_e.func_71373_a(new xray_AddGui((xrayBlocks)xrayBlocks.blocks.get(this.slot.selectedIndex), this.slot.selectedIndex));
      
      break;
    case 3: 
      this.field_73882_e.func_71373_a(null);
      mod_Xray.cooldownTicks = 0;
      break;
    default: 
      this.slot.func_77219_a(par1GuiButton);
    }
  }
}

 

 

Za pomoc dam 100 lajków.

Opublikowano

Możesz powiedzieć czy ten kod kompiluje się bez błędów?

Tak, wszystko działa.

 

metadaty:) A sam mod całkiem ciekawy. Dokończ go :)

Kod nie jest mój dlatego proszę o przeróbkę kogoś kto się na tym zna ;)

Opublikowano

Jak mozesz to daj link do calego kodu bo zapewne jest na github'ie albo czyms podobnym to Ci przerobie:)

1390144171-U592769.png


Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...