mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package tconstruct.client;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
@@ -48,9 +49,9 @@ public class CustomBowRenderer implements IItemRenderer
|
||||
GL11.glPushMatrix();
|
||||
|
||||
Block block = null;
|
||||
if (stack.getItem() instanceof ItemBlock && stack.itemID < Block.blocksList.length)
|
||||
if (stack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
block = Block.blocksList[stack.itemID];
|
||||
block = BlockUtils.getBlockFromItem(stack.getItem());
|
||||
}
|
||||
|
||||
IIcon icon = null; //living.getItemIcon(stack, renderPass);
|
||||
|
||||
@@ -896,7 +896,7 @@ public class TProxyClient extends TProxyCommon
|
||||
}
|
||||
else if (par1Str.equals("dripWater"))
|
||||
{
|
||||
entityfx = new EntityDropParticleFX(mc.theWorld, par2, par4, par6, Material.water);
|
||||
entityfx = new EntityDropParticleFX(mc.theWorld, par2, par4, par6, Material.field_151586_h);
|
||||
}
|
||||
else if (par1Str.equals("dripLava"))
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -2,6 +2,7 @@ package tconstruct.client.entity;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
@@ -70,17 +71,14 @@ public class FancyItemRender extends Render
|
||||
int i;
|
||||
|
||||
Block block = null;
|
||||
|
||||
if (itemstack.itemID < Block.blocksList.length)
|
||||
{
|
||||
block = Block.blocksList[itemstack.itemID];
|
||||
}
|
||||
|
||||
if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, renderBlocks))
|
||||
block = BlockUtils.getBlockFromItem(itemstack.getItem());
|
||||
|
||||
if (ForgeHooksClient.renderEntityItem(par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, field_147909_c))
|
||||
{
|
||||
;
|
||||
}
|
||||
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
{
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -171,7 +169,7 @@ public class FancyItemRender extends Render
|
||||
|
||||
if (this.renderWithColor)
|
||||
{
|
||||
int l = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 0);
|
||||
int l = itemstack.getItem().getColorFromItemStack(itemstack, 0);
|
||||
f8 = (float) (l >> 16 & 255) / 255.0F;
|
||||
float f9 = (float) (l >> 8 & 255) / 255.0F;
|
||||
f5 = (float) (l & 255) / 255.0F;
|
||||
@@ -323,8 +321,8 @@ public class FancyItemRender extends Render
|
||||
float f1;
|
||||
float f2;
|
||||
//TODO make this be the block equivalent to k
|
||||
Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
|
||||
Block block = BlockUtils.getBlockFromItem(k];
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType()))
|
||||
{
|
||||
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glPushMatrix();
|
||||
@@ -436,7 +434,7 @@ public class FancyItemRender extends Render
|
||||
{
|
||||
if (par3ItemStack != null)
|
||||
{
|
||||
if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float) par4, (float) par5))
|
||||
if (!ForgeHooksClient.renderInventoryItem(field_147909_c, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float) par4, (float) par5))
|
||||
{
|
||||
this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package tconstruct.client.entity.projectile;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
@@ -23,7 +24,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tconstruct.entity.projectile.ArrowEntity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -73,10 +73,10 @@ public class ArrowRender extends Render
|
||||
Block block = null;
|
||||
if (itemstack.itemID < Block.blocksList.length)
|
||||
{
|
||||
block = Block.blocksList[itemstack.itemID];
|
||||
block = BlockUtils.getBlockFromItem(itemstack.getItem());
|
||||
}
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
{
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -123,7 +123,7 @@ public class ArrowRender extends Render
|
||||
|
||||
if (this.renderWithColor)
|
||||
{
|
||||
i = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, k);
|
||||
i = itemstack.getItem().getColorFromItemStack(itemstack, k);
|
||||
f5 = (float) (i >> 16 & 255) / 255.0F;
|
||||
f4 = (float) (i >> 8 & 255) / 255.0F;
|
||||
f6 = (float) (i & 255) / 255.0F;
|
||||
@@ -144,7 +144,7 @@ public class ArrowRender extends Render
|
||||
|
||||
if (this.renderWithColor)
|
||||
{
|
||||
int l = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 0);
|
||||
int l =itemstack.getItem().getColorFromItemStack(itemstack, 0);
|
||||
f8 = (float) (l >> 16 & 255) / 255.0F;
|
||||
float f9 = (float) (l >> 8 & 255) / 255.0F;
|
||||
f5 = (float) (l & 255) / 255.0F;
|
||||
|
||||
@@ -2,6 +2,7 @@ package tconstruct.client.entity.projectile;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
@@ -23,7 +24,6 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tconstruct.entity.projectile.DaggerEntity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -70,13 +70,9 @@ public class DaggerRender extends Render
|
||||
float f6;
|
||||
int i;
|
||||
|
||||
Block block = null;
|
||||
if (itemstack.itemID < Block.blocksList.length)
|
||||
{
|
||||
block = Block.blocksList[itemstack.itemID];
|
||||
}
|
||||
Block block = BlockUtils.getBlockFromItem(itemstack.getItem());
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(itemstack.getItem()).getRenderType()))
|
||||
{
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -167,7 +163,7 @@ public class DaggerRender extends Render
|
||||
|
||||
if (this.renderWithColor)
|
||||
{
|
||||
int l = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 0);
|
||||
int l = itemstack.getItem().getColorFromItemStack(itemstack, 0);
|
||||
f8 = (float) (l >> 16 & 255) / 255.0F;
|
||||
float f9 = (float) (l >> 8 & 255) / 255.0F;
|
||||
f5 = (float) (l & 255) / 255.0F;
|
||||
@@ -306,7 +302,7 @@ public class DaggerRender extends Render
|
||||
|
||||
public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect)
|
||||
{
|
||||
int k = par3ItemStack.itemID;
|
||||
Item k = par3ItemStack.getItem();
|
||||
int l = par3ItemStack.getItemDamage();
|
||||
Object object = par3ItemStack.getIconIndex();
|
||||
float f;
|
||||
@@ -314,8 +310,8 @@ public class DaggerRender extends Render
|
||||
float f1;
|
||||
float f2;
|
||||
|
||||
Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
|
||||
Block block = BlockUtils.getBlockFromItem(k);
|
||||
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(k).getRenderType()))
|
||||
{
|
||||
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glPushMatrix();
|
||||
@@ -325,7 +321,7 @@ public class DaggerRender extends Render
|
||||
GL11.glScalef(1.0F, 1.0F, -1.0F);
|
||||
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0);
|
||||
i1 = k.getColorFromItemStack(par3ItemStack, 0);
|
||||
f = (float) (i1 >> 16 & 255) / 255.0F;
|
||||
f1 = (float) (i1 >> 8 & 255) / 255.0F;
|
||||
f2 = (float) (i1 & 255) / 255.0F;
|
||||
@@ -341,15 +337,15 @@ public class DaggerRender extends Render
|
||||
this.itemRenderBlocks.field_147844_c = true;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (Item.itemsList[k].requiresMultipleRenderPasses())
|
||||
else if (k.requiresMultipleRenderPasses())
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
for (int j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1)
|
||||
for (int j1 = 0; j1 < k.getRenderPasses(l); ++j1)
|
||||
{
|
||||
par2TextureManager.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
IIcon icon = Item.itemsList[k].getIcon(par3ItemStack, j1);
|
||||
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
|
||||
IIcon icon = k.getIcon(par3ItemStack, j1);
|
||||
int k1 = k.getColorFromItemStack(par3ItemStack, j1);
|
||||
f1 = (float) (k1 >> 16 & 255) / 255.0F;
|
||||
f2 = (float) (k1 >> 8 & 255) / 255.0F;
|
||||
float f3 = (float) (k1 & 255) / 255.0F;
|
||||
@@ -380,7 +376,7 @@ public class DaggerRender extends Render
|
||||
object = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(resourcelocation)).getAtlasSprite("missingno");
|
||||
}
|
||||
|
||||
i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0);
|
||||
i1 = k.getColorFromItemStack(par3ItemStack, 0);
|
||||
f = (float) (i1 >> 16 & 255) / 255.0F;
|
||||
f1 = (float) (i1 >> 8 & 255) / 255.0F;
|
||||
f2 = (float) (i1 & 255) / 255.0F;
|
||||
|
||||
@@ -36,17 +36,17 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
super.initGui();
|
||||
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.buttonList.clear();
|
||||
int cornerY = (this.field_146294_l - this.ySize) / 2;
|
||||
this.field_146292_n.clear();
|
||||
|
||||
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
|
||||
// tab.enabled = false;
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
|
||||
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class);
|
||||
TabRegistry.addTabsToList(this.buttonList);
|
||||
TabRegistry.addTabsToList(this.field_146292_n);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
@@ -62,19 +62,19 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
this.ySize_lo = (float) par2;
|
||||
// if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack)
|
||||
// {
|
||||
// if (this.buttonList.size() < 3)
|
||||
// if (this.field_146292_n.size() < 3)
|
||||
// {
|
||||
// int cornerX = guiLeft;
|
||||
// int cornerY = (this.height - this.ySize) / 2;
|
||||
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (this.buttonList.size() >= 3)
|
||||
// if (this.field_146292_n.size() >= 3)
|
||||
// {
|
||||
// buttonList.remove(2);
|
||||
// field_146292_n.remove(2);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
//mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
int cornerY = (field_146294_l - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
if (!stats.isStackInSlot(0))
|
||||
|
||||
@@ -27,19 +27,19 @@ public class KnapsackGui extends GuiContainer
|
||||
super.initGui();
|
||||
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.buttonList.clear();
|
||||
int cornerY = (this.field_146294_l - this.ySize) / 2;
|
||||
this.field_146292_n.clear();
|
||||
|
||||
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabKnapsack.class);
|
||||
TabRegistry.addTabsToList(this.buttonList);
|
||||
TabRegistry.addTabsToList(this.field_146292_n);
|
||||
|
||||
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
// tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
|
||||
// tab.enabled = false;
|
||||
// this.buttonList.add(tab);
|
||||
// this.field_146292_n.add(tab);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
@@ -55,7 +55,7 @@ public class KnapsackGui extends GuiContainer
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
int cornerY = (field_146294_l - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,20 +66,20 @@ public class StencilTableGui extends GuiContainer
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
/*ToolGuiElement repair = TConstruct.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);*/
|
||||
this.buttonList.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.buttonList.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.field_146292_n.add(repairButton);*/
|
||||
this.field_146292_n.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
this.field_146292_n.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, StatCollector.translateToLocal("gui.stenciltable1")));
|
||||
|
||||
//for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++)
|
||||
//{
|
||||
|
||||
/*ToolGuiElement element = TConstruct.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, element.texture); // Repair
|
||||
this.buttonList.add(button);*/
|
||||
this.field_146292_n.add(button);*/
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class StencilTableGui extends GuiContainer
|
||||
int meta = pattern.getItemDamage();
|
||||
if (meta == 0)
|
||||
{
|
||||
if (button.id == 0)
|
||||
if (button.field_146127_k == 0)
|
||||
{
|
||||
patternIndex++;
|
||||
if (patternIndex == 21)
|
||||
@@ -99,7 +99,7 @@ public class StencilTableGui extends GuiContainer
|
||||
if (patternIndex >= TRepo.patternOutputs.length - 1)
|
||||
patternIndex = 0;
|
||||
}
|
||||
else if (button.id == 1)
|
||||
else if (button.field_146127_k == 1)
|
||||
{
|
||||
patternIndex--;
|
||||
if (patternIndex < 0)
|
||||
|
||||
@@ -39,11 +39,11 @@ public class ToolForgeGui extends ToolStationGui
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
ToolGuiElement repair = TConstructClientRegistry.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.domain, repair.texture, repair); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);
|
||||
repairButton.field_146124_l = false;
|
||||
this.field_146292_n.add(repairButton);
|
||||
int offset = TConstructClientRegistry.tierTwoButtons.size();
|
||||
|
||||
for (int iter = 0; iter < TConstructClientRegistry.tierTwoButtons.size(); iter++)
|
||||
@@ -51,7 +51,7 @@ public class ToolForgeGui extends ToolStationGui
|
||||
ToolGuiElement element = TConstructClientRegistry.tierTwoButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter + 1, cornerX - 110 + 22 * ((iter + 1) % 5), cornerY + 22 * ((iter + 1) / 5), element.buttonIconX, element.buttonIconY, repair.domain,
|
||||
element.texture, element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
|
||||
for (int iter = 1; iter < TConstructClientRegistry.toolButtons.size(); iter++)
|
||||
@@ -59,16 +59,16 @@ public class ToolForgeGui extends ToolStationGui
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter + offset, cornerX - 110 + 22 * ((iter + offset) % 5), cornerY + 22 * ((iter + offset) / 5), element.buttonIconX, element.buttonIconY,
|
||||
repair.domain, element.texture, element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
}
|
||||
|
||||
protected void actionPerformed (GuiButton button)
|
||||
{
|
||||
GuiButtonTool b = (GuiButtonTool) button;
|
||||
((GuiButton) this.buttonList.get(selectedButton)).enabled = true;
|
||||
selectedButton = button.id;
|
||||
button.enabled = false;
|
||||
((GuiButton) this.field_146292_n.get(selectedButton)).field_146124_l = true;
|
||||
selectedButton = button.field_146127_k;
|
||||
button.field_146124_l = false;
|
||||
|
||||
setSlotType(b.element.slotType);
|
||||
iconX = b.element.iconsX;
|
||||
|
||||
@@ -90,26 +90,26 @@ public class ToolStationGui extends NewContainerGui
|
||||
int cornerX = (this.field_146294_l - this.xSize) / 2;
|
||||
int cornerY = (this.field_146295_m - this.ySize) / 2;
|
||||
|
||||
this.buttonList.clear();
|
||||
this.field_146292_n.clear();
|
||||
ToolGuiElement repair = TConstructClientRegistry.toolButtons.get(0);
|
||||
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.domain, repair.texture, repair); // Repair
|
||||
repairButton.enabled = false;
|
||||
this.buttonList.add(repairButton);
|
||||
repairButton.field_146124_l = false;
|
||||
this.field_146292_n.add(repairButton);
|
||||
|
||||
for (int iter = 1; iter < TConstructClientRegistry.toolButtons.size(); iter++)
|
||||
{
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(iter);
|
||||
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, repair.domain, element.texture,
|
||||
element);
|
||||
this.buttonList.add(button);
|
||||
this.field_146292_n.add(button);
|
||||
}
|
||||
}
|
||||
|
||||
protected void actionPerformed (GuiButton button)
|
||||
{
|
||||
((GuiButton) this.buttonList.get(guiType)).enabled = true;
|
||||
guiType = button.id;
|
||||
button.enabled = false;
|
||||
((GuiButton) this.field_146292_n.get(guiType)).field_146124_l = true;
|
||||
guiType = button.field_146127_k;
|
||||
button.field_146124_l = false;
|
||||
|
||||
ToolGuiElement element = TConstructClientRegistry.toolButtons.get(guiType);
|
||||
setSlotType(element.slotType);
|
||||
|
||||
@@ -30,10 +30,10 @@ public class TabRegistry
|
||||
//Values are public at runtime.
|
||||
int cornerX = gui.guiLeft;
|
||||
int cornerY = gui.guiTop;
|
||||
gui.buttonList.clear();
|
||||
gui.field_146292_n.clear();
|
||||
|
||||
updateTabValues(cornerX, cornerY, InventoryTabVanilla.class);
|
||||
addTabsToList(gui.buttonList);
|
||||
addTabsToList(gui.field_146292_n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ public class TabRegistry
|
||||
}
|
||||
}
|
||||
|
||||
public static void addTabsToList (List buttonList)
|
||||
public static void addTabsToList (List field_146292_n)
|
||||
{
|
||||
for (AbstractTab tab : tabList)
|
||||
{
|
||||
if (tab.shouldAddToList())
|
||||
{
|
||||
buttonList.add(tab);
|
||||
field_146292_n.add(tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user