mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
fixed a whole bunch of client side stuff
This commit is contained in:
1 parent
9814eadaea
commit
a5862aae20
42 files changed
+253
-658
No files matched your search
@@ -57,7 +57,7 @@ public class TClientEvents
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TConstruct.logger.warning("Failed to register one or more sounds");
|
||||
TConstruct.logger.error("Failed to register one or more sounds");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public class TClientEvents
|
||||
f *= 1.1F;
|
||||
}
|
||||
|
||||
if (event.entity.isUsingItem() && event.entity.getItemInUse().itemID == Items.bow.itemID)
|
||||
if (event.entity.isUsingItem() && event.entity.getItemInUse() == Items.bow)
|
||||
{
|
||||
int i = event.entity.getItemInUseDuration();
|
||||
float f1 = (float) i / 20.0F;
|
||||
|
||||
@@ -74,31 +74,31 @@ public class TProxyClient extends TProxyCommon
|
||||
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
if (ID == toolStationID)
|
||||
return new ToolStationGui(player.inventory, (ToolStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new ToolStationGui(player.inventory, (ToolStationLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == partBuilderID)
|
||||
return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == patternChestID)
|
||||
return new PatternChestGui(player.inventory, (PatternChestLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new PatternChestGui(player.inventory, (PatternChestLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == frypanGuiID)
|
||||
return new FrypanGui(player.inventory, (FrypanLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new FrypanGui(player.inventory, (FrypanLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == smelteryGuiID)
|
||||
{
|
||||
if (PHConstruct.newSmeltery)
|
||||
return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
else
|
||||
return new SmelteryGui(player.inventory, (SmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new SmelteryGui(player.inventory, (SmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
}
|
||||
if (ID == stencilTableID)
|
||||
return new StencilTableGui(player.inventory, (StencilTableLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new StencilTableGui(player.inventory, (StencilTableLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == toolForgeID)
|
||||
return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
if (ID == landmineID)
|
||||
return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.getBlockTileEntity(x, y, z)));
|
||||
return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.func_147438_o(x, y, z)));
|
||||
if (ID == craftingStationID)
|
||||
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
|
||||
return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.func_147438_o(x, y, z), world, x, y, z);
|
||||
|
||||
if (ID == furnaceID)
|
||||
return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z));
|
||||
return new FurnaceGui(player.inventory, (FurnaceLogic) world.func_147438_o(x, y, z));
|
||||
|
||||
if (ID == inventoryGui)
|
||||
{
|
||||
@@ -360,7 +360,7 @@ public class TProxyClient extends TProxyCommon
|
||||
MantleClientRegistry.registerManualIcon("broadaxehead", new ItemStack(TRepo.broadAxeHead, 1, 2));
|
||||
MantleClientRegistry.registerManualIcon("largeswordblade", new ItemStack(TRepo.largeSwordBlade, 1, 2));
|
||||
|
||||
MantleClientRegistry.registerManualIcon("toolrod", new ItemStack(Item.stick));
|
||||
MantleClientRegistry.registerManualIcon("toolrod", new ItemStack(Items.stick));
|
||||
|
||||
MantleClientRegistry.registerManualIcon("binding", new ItemStack(TRepo.binding, 1, 4));
|
||||
MantleClientRegistry.registerManualIcon("wideguard", new ItemStack(TRepo.wideGuard, 1, 4));
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ToolCoreRenderer implements IItemRenderer
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
TConstruct.logger.warning("[TCon] Unhandled render case!");
|
||||
TConstruct.logger.warn("[TCon] Unhandled render case!");
|
||||
case FIRST_PERSON_MAP:
|
||||
return false;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class ToolCoreRenderer implements IItemRenderer
|
||||
}
|
||||
}
|
||||
for (int i = iconParts; i-- > 0;)
|
||||
tempParts[i] = tool.getIIcon(item, i);
|
||||
tempParts[i] = tool.getIcon(item, i);
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
if (modelID == renderID)
|
||||
{
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.func_147438_o(x, y, z);
|
||||
|
||||
if (!tile.hasTankConnected(ForgeDirection.DOWN))//CentrePiece, floor is removed if tank below is found
|
||||
{
|
||||
@@ -318,7 +318,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
|
||||
float blue = (color & 0xFF) / 255.0F;
|
||||
Fluid fluid = liquid.getFluid();
|
||||
if (fluid.canBePlacedInWorld())
|
||||
BlockSkinRenderHelper.renderMetadataBlock(Block.blocksList[fluid.getBlockID()], 0, x, y, z, renderer, world);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
|
||||
else
|
||||
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
|
||||
}
|
||||
@@ -329,27 +329,27 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BlockSkinRenderHelper
|
||||
var8 = var11;
|
||||
}
|
||||
|
||||
return Minecraft.isAmbientOcclusionEnabled() && Block.lightValue[block.blockID] == 0 ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
return Minecraft.isAmbientOcclusionEnabled() && block.lightValue == 0 ? renderMetadataBlockWithAmbientOcclusion(block, metadata, x, y, z, var6, var7, var8, renderer, world)
|
||||
: renderMetadataBlockWithColorMultiplier(block, metadata, x, y, z, var6, var7, var8, renderer, world);
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ public class BlockSkinRenderHelper
|
||||
float f17 = f5;
|
||||
float f18 = f6;
|
||||
|
||||
if (block != Block.grass)
|
||||
if (block != Blocks.grass)
|
||||
{
|
||||
f10 = f3 * colorRed;
|
||||
f11 = f5 * colorRed;
|
||||
@@ -1614,7 +1614,7 @@ public class BlockSkinRenderHelper
|
||||
float f17 = f5;
|
||||
float f18 = f6;
|
||||
|
||||
if (block != Block.grass)
|
||||
if (block != Blocks.grass)
|
||||
{
|
||||
f10 = f3 * colorRed;
|
||||
f11 = f5 * colorRed;
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.client.block;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -21,7 +22,7 @@ public class BreakingFX extends EntityFX
|
||||
super(par1World, par2, par4, par6, 0.0D, 0.0D, 0.0D);
|
||||
this.setParticleIcon(par8Item.getIconFromDamage(par9));
|
||||
this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
|
||||
this.particleGravity = Block.blockSnow.blockParticleGravity;
|
||||
this.particleGravity = Blocks.snow.blockParticleGravity;
|
||||
this.particleScale /= 2.0F;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,27 +80,27 @@ public class DryingRackRender implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ public class PaneRender implements ISimpleBlockRenderingHandler
|
||||
boolean flag1 = false;
|
||||
IIcon icon;
|
||||
IIcon icon1;
|
||||
int meta = iblockaccess.getBlockMetadata(x, y, z);
|
||||
icon = renderblocks.getBlockIconFromSideAndMetadata(pane, 0, meta);
|
||||
int meta = iblockaccess.func_147439_aMetadata(x, y, z);
|
||||
icon = renderblocks.func_147439_aIconFromSideAndMetadata(pane, 0, meta);
|
||||
icon1 = pane.getSideTextureIndex(meta);
|
||||
|
||||
meta = icon.getIconWidth();
|
||||
@@ -97,8 +97,8 @@ public class PaneRender implements ISimpleBlockRenderingHandler
|
||||
/*int blockTextureIndex;
|
||||
int blockSideIndex;
|
||||
|
||||
int j1 = iblockaccess.getBlockMetadata(x, y, z);
|
||||
blockTextureIndex = pane.getBlockTextureFromSideAndMetadata(0, j1);
|
||||
int j1 = iblockaccess.func_147439_aMetadata(x, y, z);
|
||||
blockTextureIndex = pane.func_147439_aTextureFromSideAndMetadata(0, j1);
|
||||
blockSideIndex = pane.getSideTextureIndex(j1);
|
||||
|
||||
int k1 = (blockTextureIndex & 0xf) << 4;
|
||||
@@ -126,10 +126,10 @@ public class PaneRender implements ISimpleBlockRenderingHandler
|
||||
double xMidUp = (double) x + 0.5D + 0.0625D;
|
||||
double zMidDown = ((double) z + 0.5D) - 0.0625D;
|
||||
double zMidUp = (double) z + 0.5D + 0.0625D;
|
||||
boolean west = pane.canConnectTo(iblockaccess.getBlock(x, y, z - 1));
|
||||
boolean east = pane.canConnectTo(iblockaccess.getBlock(x, y, z + 1));
|
||||
boolean south = pane.canConnectTo(iblockaccess.getBlock(x - 1, y, z));
|
||||
boolean north = pane.canConnectTo(iblockaccess.getBlock(x + 1, y, z));
|
||||
boolean west = pane.canConnectTo(iblockaccess.func_147439_a(x, y, z - 1));
|
||||
boolean east = pane.canConnectTo(iblockaccess.func_147439_a(x, y, z + 1));
|
||||
boolean south = pane.canConnectTo(iblockaccess.func_147439_a(x - 1, y, z));
|
||||
boolean north = pane.canConnectTo(iblockaccess.func_147439_a(x + 1, y, z));
|
||||
boolean renderAbove = pane.shouldSideBeRendered(iblockaccess, x, y + 1, z, 1);
|
||||
boolean renderBelow = pane.shouldSideBeRendered(iblockaccess, x, y - 1, z, 0);
|
||||
if ((!south || !north) && (south || north || west || east))
|
||||
|
||||
@@ -92,27 +92,27 @@ public class PunjiRender implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -83,16 +83,16 @@ public class RenderLandmine implements ISimpleBlockRenderingHandler
|
||||
renderer.func_147784_q(block, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId ()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory (int modelId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -159,9 +159,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
renderer.func_147782_a(0.6875, 0.0F, 0.6875, 1.0F, 0.625F, 1.0F);
|
||||
renderer.func_147784_q(block, x, y, z);
|
||||
|
||||
if (world.getBlockTileEntity(x, y, z) instanceof CastingTableLogic)
|
||||
if (world.func_147438_o(x, y, z) instanceof CastingTableLogic)
|
||||
{
|
||||
CastingTableLogic logic = (CastingTableLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingTableLogic logic = (CastingTableLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.liquid != null)
|
||||
{
|
||||
float minHeight = 0.9375F;
|
||||
@@ -200,9 +200,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
else if (metadata == 1)
|
||||
{
|
||||
if (world.getBlockTileEntity(x, y, z) instanceof FaucetLogic)
|
||||
if (world.func_147438_o(x, y, z) instanceof FaucetLogic)
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
FaucetLogic logic = (FaucetLogic) world.func_147438_o(x, y, z);
|
||||
float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F, zMax = 0.625F;
|
||||
switch (logic.getRenderDirection())
|
||||
{
|
||||
@@ -250,7 +250,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
float yMin = 0F;
|
||||
Block uBlock= world.getBlockId(x, y - 1, z);
|
||||
Block uBlock= world.func_147439_a(x, y - 1, z);
|
||||
int uMeta = world.getBlockMetadata(x, y - 1, z);
|
||||
if (uBlock== TRepo.searedBlock && uMeta == 0)
|
||||
{
|
||||
@@ -364,9 +364,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
renderer.func_147784_q(block, x, y, z);
|
||||
|
||||
//Liquids
|
||||
if (world.getBlockTileEntity(x, y, z) instanceof CastingBasinLogic)
|
||||
if (world.func_147438_o(x, y, z) instanceof CastingBasinLogic)
|
||||
{
|
||||
CastingBasinLogic logic = (CastingBasinLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingBasinLogic logic = (CastingBasinLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.liquid != null)
|
||||
{
|
||||
float minHeight = 0.25F;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
int bMeta = world.getBlockMetadata(x, y, z);
|
||||
IIcon iconStill = block.getIcon(1, bMeta);
|
||||
IIcon iconStill = block.func_149691_a(1, bMeta);
|
||||
float flowDir = (float) (bMeta / 8f * 2 * Math.PI); //Tau, radians
|
||||
|
||||
double u1, u2, u3, u4, v1, v2, v3, v4;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
renderer.func_147784_q(block, x, y, z);
|
||||
SmelteryLogic logic = (SmelteryLogic) world.getBlockTileEntity(x, y, z);
|
||||
SmelteryLogic logic = (SmelteryLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.validStructure)
|
||||
{
|
||||
int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1;
|
||||
@@ -85,7 +85,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
|
||||
float maxZ = i / 3 == 2 ? 1.001F : 1F;
|
||||
renderer.func_147782_a(minX, renderBase, minZ, maxX, renderHeight, maxZ);
|
||||
if (fluid.canBePlacedInWorld())
|
||||
BlockSkinRenderHelper.renderMetadataBlock(Block.blocksList[fluid.getBlockID()], 0, posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
|
||||
else
|
||||
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
|
||||
}
|
||||
|
||||
@@ -69,27 +69,27 @@ public class TableForgeRender implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -86,27 +86,27 @@ public class TableRender implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -28,14 +28,14 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
TankAirLogic logic = (TankAirLogic) world.getBlockTileEntity(x, y, z);
|
||||
TankAirLogic logic = (TankAirLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.hasItem())
|
||||
{
|
||||
ItemStack item = logic.getStackInSlot(0);
|
||||
if (item.getItem() instanceof ItemBlock)
|
||||
{
|
||||
Block inv = Block.blocksList[item.itemID];
|
||||
renderer.setOverrideBlockTexture(inv.getIcon(1, item.getItemDamage()));
|
||||
renderer.setOverrideBlockTexture(inv.func_149691_a(1, item.getItemDamage()));
|
||||
renderer.renderBlockByRenderType(inv, x, y, z);
|
||||
renderer.clearOverrideBlockTexture();
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
|
||||
//System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base, fluidstack.amount)+", fluid amount: "+fluidstack.amount);
|
||||
renderer.func_147782_a(0.0, getBaseAmount(base), 0.0, 1.0, getHeightAmount(base, fluidstack.amount), 1.0);
|
||||
if (fluid.canBePlacedInWorld())
|
||||
BlockSkinRenderHelper.renderMetadataBlock(Block.blocksList[fluid.getBlockID()], 0, x, y, z, renderer, world);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
|
||||
else
|
||||
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
|
||||
base += fluidstack.amount;
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.client.block;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -12,7 +13,6 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tconstruct.blocks.logic.LavaTankLogic;
|
||||
import tconstruct.client.TProxyClient;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
@@ -40,14 +40,14 @@ public class TankRender implements ISimpleBlockRenderingHandler
|
||||
if (modelID == tankModelID)
|
||||
{
|
||||
//Liquid
|
||||
LavaTankLogic logic = (LavaTankLogic) world.getBlockTileEntity(x, y, z);
|
||||
LavaTankLogic logic = (LavaTankLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.containsFluid())
|
||||
{
|
||||
FluidStack liquid = logic.tank.getFluid();
|
||||
renderer.func_147782_a(0.001, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999);
|
||||
Fluid fluid = liquid.getFluid();
|
||||
if (fluid.canBePlacedInWorld())
|
||||
BlockSkinRenderHelper.renderMetadataBlock(Block.blocksList[fluid.getBlockID()], 0, x, y, z, renderer, world);
|
||||
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
|
||||
else
|
||||
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
|
||||
|
||||
//Block
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 0 && world.getBlockId(x, y + 1, z) == 0)
|
||||
if (meta == 0 && world.func_147439_a(x, y + 1, z) == Blocks.air)
|
||||
{
|
||||
renderer.func_147782_a(0.1875, 0, 0.1875, 0.8125, 0.125, 0.8125);
|
||||
renderer.func_147784_q(block, x, y + 1, z);
|
||||
@@ -85,27 +85,27 @@ public class TankRender implements ISimpleBlockRenderingHandler
|
||||
GL11.glTranslatef(-0.5F, 0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
renderblocks.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
renderblocks.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
renderblocks.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
renderblocks.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
renderblocks.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.func_149691_a(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ArrowRenderCustom extends Render
|
||||
GL11.glTranslatef(-7 / 16f, -8 / 16f, -1 / 32f);
|
||||
float scale = 1.35f;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
ForgeHooksClient.renderEntityItem(null, item, 0, 0, random, renderManager.renderEngine, renderBlocks);
|
||||
ForgeHooksClient.renderEntityItem(null, item, 0, 0, random, renderManager.renderEngine, field_147909_c);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DaggerRenderCustom extends Render
|
||||
GL11.glTranslatef(-7 / 16f, -8 / 16f, -1 / 32f);
|
||||
float scale = 1.35f;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
ForgeHooksClient.renderEntityItem(null, item, 0, 0, random, renderManager.renderEngine, renderBlocks);
|
||||
ForgeHooksClient.renderEntityItem(null, item, 0, 0, random, renderManager.renderEngine, field_147909_c);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
//mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
@@ -107,7 +107,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
|
||||
|
||||
cornerX = this.guiLeft;
|
||||
cornerY = this.guiTop;
|
||||
drawPlayerOnGui(this.mc, cornerX + 33, cornerY + 75, 30, (float) (cornerX + 51) - this.xSize_lo, (float) (cornerY + 75 - 50) - this.ySize_lo);
|
||||
drawPlayerOnGui(this.field_146297_k, cornerX + 33, cornerY + 75, 30, (float) (cornerX + 51) - this.xSize_lo, (float) (cornerY + 75 - 50) - this.ySize_lo);
|
||||
}
|
||||
|
||||
public static void drawPlayerOnGui (Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5)
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
super(logic.getGuiContainer(inventory, world, x, y, z));
|
||||
this.logic = logic;
|
||||
//text = new GuiTextField(this.fontRenderer, this.xSize / 2 - 5, 8, 30, 12);
|
||||
//text = new GuiTextField(this.field_146289_q, this.xSize / 2 - 5, 8, 30, 12);
|
||||
//this.text.setText("");
|
||||
title = "\u00A7nRepair and Modification";
|
||||
body = "The main way to repair or change your tools or armor.\n\nPlace an item and a material on the left to get started.";
|
||||
@@ -42,11 +42,11 @@ public class CraftingStationGui extends GuiContainer
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal(logic.tinkerTable ? "crafters.TinkerTable" : logic.getInvName()), 8, 6, 0x202020);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x202020);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal(logic.tinkerTable ? "crafters.TinkerTable" : logic.getInvName()), 8, 6, 0x202020);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x202020);
|
||||
if (logic.chest != null)
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal(logic.chest.get().getInvName()), -108, this.ySize - 160, 0x202020);
|
||||
//this.fontRenderer.drawString(toolName + "_", this.xSize / 2 - 18, 8, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal(logic.chest.get().getInvName()), -108, this.ySize - 160, 0x202020);
|
||||
//this.field_146289_q.drawString(toolName + "_", this.xSize / 2 - 18, 8, 0xffffff);
|
||||
|
||||
if (logic.tinkerTable)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
ToolCore tool = (ToolCore) stack.getItem();
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
this.drawCenteredString(fontRenderer, "\u00A7n" + tool.getToolName(), xSize + 63, 8, 0xffffff);
|
||||
this.drawCenteredString(field_146289_q, "\u00A7n" + tool.getToolName(), xSize + 63, 8, 0xffffff);
|
||||
|
||||
drawModularToolStats(stack, tool, tags);
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
ArmorCore armor = (ArmorCore) stack.getItem();
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("TinkerArmor");
|
||||
this.drawCenteredString(fontRenderer, "\u00A7n" + armor.getClass().getSimpleName(), xSize + 63, 8, 0xffffff);
|
||||
this.drawCenteredString(field_146289_q, "\u00A7n" + armor.getClass().getSimpleName(), xSize + 63, 8, 0xffffff);
|
||||
|
||||
drawModularArmorStats(stack, armor, tags);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
int offset = 0;
|
||||
if (modifiers > 0)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
@@ -104,14 +104,14 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
if (maxDur >= 10000)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation1"), xSize + 8, base + offset * 11, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation1"), xSize + 8, base + offset * 11, 0xffffff);
|
||||
offset++;
|
||||
fontRenderer.drawString("- " + availableDurability + "/" + maxDur, xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString("- " + availableDurability + "/" + maxDur, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
else
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation2") + availableDurability + "/" + maxDur, xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation2") + availableDurability + "/" + maxDur, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
@@ -129,16 +129,16 @@ public class CraftingStationGui extends GuiContainer
|
||||
|
||||
String heart = attack == 2 ? StatCollector.translateToLocal("gui.partcrafter9") : StatCollector.translateToLocal("gui.partcrafter10");
|
||||
if (attack % 2 == 0)
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation3") + attack / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation3") + attack / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
else
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation3") + attack / 2f + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation3") + attack / 2f + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
|
||||
if (stoneboundDamage != 0)
|
||||
{
|
||||
heart = stoneboundDamage == 2 ? StatCollector.translateToLocal("gui.partcrafter9") : StatCollector.translateToLocal("gui.partcrafter10");
|
||||
String bloss = stoneboundDamage > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
|
||||
this.fontRenderer.drawString(bloss + (int) stoneboundDamage / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(bloss + (int) stoneboundDamage / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
offset++;
|
||||
@@ -151,9 +151,9 @@ public class CraftingStationGui extends GuiContainer
|
||||
int drawSpeed = tags.getInteger("DrawSpeed");
|
||||
float flightSpeed = tags.getFloat("FlightSpeed");
|
||||
float trueDraw = drawSpeed / 20f * flightSpeed;
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation6") + df.format(trueDraw) + "s", xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation6") + df.format(trueDraw) + "s", xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation7") + df.format(flightSpeed) + "x", xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation7") + df.format(flightSpeed) + "x", xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
offset++;
|
||||
}
|
||||
@@ -167,28 +167,28 @@ public class CraftingStationGui extends GuiContainer
|
||||
float shatter = tags.getFloat("BreakChance");
|
||||
float accuracy = tags.getFloat("Accuracy");
|
||||
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation10"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation10"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
String heart = attack == 2 ? StatCollector.translateToLocal("gui.partcrafter9") : StatCollector.translateToLocal("gui.partcrafter10");
|
||||
if (attack % 2 == 0)
|
||||
this.fontRenderer.drawString("- " + attack / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString("- " + attack / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
else
|
||||
this.fontRenderer.drawString("- " + attack / 2f + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString("- " + attack / 2f + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
int minAttack = attack;
|
||||
int maxAttack = attack * 2;
|
||||
heart = StatCollector.translateToLocal("gui.partcrafter10");
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation11"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation11"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
this.fontRenderer.drawString(df.format(minAttack / 2f) + "-" + df.format(maxAttack / 2f) + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(df.format(minAttack / 2f) + "-" + df.format(maxAttack / 2f) + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
offset++;
|
||||
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation8") + df.format(mass), xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation8") + df.format(mass), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
/*this.fontRenderer.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
|
||||
/*this.field_146289_q.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;*/
|
||||
offset++;
|
||||
}
|
||||
@@ -204,20 +204,20 @@ public class CraftingStationGui extends GuiContainer
|
||||
float trueSpeed = mineSpeed + stoneboundSpeed;
|
||||
float trueSpeed2 = mineSpeed + stoneboundSpeed;
|
||||
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation12"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation12"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
fontRenderer.drawString("- " + df.format(trueSpeed) + ", " + df.format(trueSpeed2), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString("- " + df.format(trueSpeed) + ", " + df.format(trueSpeed2), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
if (stoneboundSpeed != 0)
|
||||
{
|
||||
String bloss = stoneboundSpeed > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
|
||||
fontRenderer.drawString(bloss + df.format(stoneboundSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(bloss + df.format(stoneboundSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
offset++;
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation13"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation13"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
fontRenderer
|
||||
field_146289_q
|
||||
.drawString("- " + getHarvestLevelName(tags.getInteger("HarvestLevel")) + ", " + getHarvestLevelName(tags.getInteger("HarvestLevel2")), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
offset++;
|
||||
@@ -253,15 +253,15 @@ public class CraftingStationGui extends GuiContainer
|
||||
trueSpeed += stoneboundSpeed;
|
||||
if (trueSpeed < 0)
|
||||
trueSpeed = 0;
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation14") + df.format(trueSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation14") + df.format(trueSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
if (stoneboundSpeed != 0)
|
||||
{
|
||||
String bloss = stoneboundSpeed > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
|
||||
fontRenderer.drawString(bloss + df.format(stoneboundSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(bloss + df.format(stoneboundSpeed), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation15") + getHarvestLevelName(tags.getInteger("HarvestLevel")), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation15") + getHarvestLevelName(tags.getInteger("HarvestLevel")), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
offset++;
|
||||
}
|
||||
@@ -269,7 +269,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
float mineSpeed = tags.getInteger("MiningSpeed");
|
||||
float trueSpeed = mineSpeed / (100f);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation16") + trueSpeed, xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation16") + trueSpeed, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
offset++;
|
||||
}
|
||||
@@ -277,12 +277,12 @@ public class CraftingStationGui extends GuiContainer
|
||||
int modifiers = tags.getInteger("Modifiers");
|
||||
if (modifiers > 0)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation18") + tags.getInteger("Modifiers"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
if (tags.hasKey("Tooltip1"))
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("gui.toolstation17"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("gui.toolstation17"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
}
|
||||
|
||||
boolean displayToolTips = true;
|
||||
@@ -294,7 +294,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
if (tags.hasKey(tooltip))
|
||||
{
|
||||
String tipName = tags.getString(tooltip);
|
||||
fontRenderer.drawString("- " + tipName, xSize + 8, base + (offset + tipNum) * 10, 0xffffff);
|
||||
field_146289_q.drawString("- " + tipName, xSize + 8, base + (offset + tipNum) * 10, 0xffffff);
|
||||
}
|
||||
else
|
||||
displayToolTips = false;
|
||||
@@ -324,8 +324,8 @@ public class CraftingStationGui extends GuiContainer
|
||||
|
||||
void drawToolInformation ()
|
||||
{
|
||||
this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 0xffffff);
|
||||
fontRenderer.drawSplitString(body, xSize + 8, 24, 115, 0xffffff);
|
||||
this.drawCenteredString(field_146289_q, title, xSize + 63, 8, 0xffffff);
|
||||
field_146289_q.drawSplitString(body, xSize + 8, 24, 115, 0xffffff);
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/tinkertable.png");
|
||||
@@ -338,7 +338,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
// Draw the background
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
@@ -348,20 +348,20 @@ public class CraftingStationGui extends GuiContainer
|
||||
this.drawTexturedModalRect(cornerX + 62, cornerY, 0, this.ySize, 112, 22);
|
||||
}
|
||||
|
||||
this.mc.getTextureManager().bindTexture(icons);
|
||||
this.field_146297_k.getTextureManager().bindTexture(icons);
|
||||
// Draw the slots
|
||||
|
||||
if (logic.tinkerTable && !logic.isStackInSlot(5))
|
||||
this.drawTexturedModalRect(cornerX + 47, cornerY + 33, 0, 233, 18, 18);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(icons);
|
||||
this.field_146297_k.getTextureManager().bindTexture(icons);
|
||||
|
||||
//Draw chest side
|
||||
if (logic.chest != null)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(chest);
|
||||
this.field_146297_k.getTextureManager().bindTexture(chest);
|
||||
if (logic.doubleChest == null)
|
||||
this.drawTexturedModalRect(cornerX - 116, cornerY, 0, 0, 121, this.ySize);
|
||||
else
|
||||
@@ -372,7 +372,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
if (logic.tinkerTable)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(description);
|
||||
this.field_146297_k.getTextureManager().bindTexture(description);
|
||||
cornerX = (this.width + this.xSize) / 2;
|
||||
cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, 126, this.ySize + 30);
|
||||
|
||||
@@ -22,8 +22,8 @@ public class FrypanGui extends GuiContainer
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("crafters.Frypan"), 60, 6, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("crafters.Frypan"), 60, 6, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/frypan.png");
|
||||
@@ -31,7 +31,7 @@ public class FrypanGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GuiLandmine extends GuiContainer
|
||||
@Override
|
||||
protected void drawItemStackTooltip (ItemStack par1ItemStack, int par2, int par3)
|
||||
{
|
||||
List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
List list = par1ItemStack.getTooltip(this.field_146297_k.thePlayer, this.field_146297_k.gameSettings.advancedItemTooltips);
|
||||
|
||||
Behavior b = Behavior.getBehaviorFromStack(par1ItemStack);
|
||||
if (b != null)
|
||||
@@ -56,7 +56,7 @@ public class GuiLandmine extends GuiContainer
|
||||
}
|
||||
|
||||
FontRenderer font = par1ItemStack.getItem().getFontRenderer(par1ItemStack);
|
||||
drawHoveringText(list, par2, par3, (font == null ? fontRenderer : font));
|
||||
drawHoveringText(list, par2, par3, (font == null ? field_146289_q : font));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,20 +64,20 @@ public class GuiLandmine extends GuiContainer
|
||||
{
|
||||
if (container.te != null)
|
||||
{
|
||||
fontRenderer.drawString(container.te.getInvName(), 8, 5, 4210752);
|
||||
field_146289_q.drawString(container.te.getInvName(), 8, 5, 4210752);
|
||||
}
|
||||
else
|
||||
{
|
||||
fontRenderer.drawString("Landmine", 8, 5, 4210752);
|
||||
field_146289_q.drawString("Landmine", 8, 5, 4210752);
|
||||
}
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 3, 4210752);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 3, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(background);
|
||||
field_146297_k.renderEngine.bindTexture(background);
|
||||
int x = (width - xSize) / 2;
|
||||
int y = (height - ySize) / 2;
|
||||
this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
|
||||
@@ -44,8 +44,8 @@ public class KnapsackGui extends GuiContainer
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("inventory.knapsack"), 8, 6, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("inventory.knapsack"), 8, 6, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/knapsack.png");
|
||||
@@ -53,7 +53,7 @@ public class KnapsackGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = guiLeft;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
@@ -231,8 +231,8 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||
this.zLevel = 200.0F;
|
||||
itemRenderer.zLevel = 200.0F;
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.field_146289_q, this.field_146297_k.renderEngine, par1ItemStack, par2, par3);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.field_146289_q, this.field_146297_k.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
String s = (String) iterator.next();
|
||||
int l = this.fontRenderer.getStringWidth(s);
|
||||
int l = this.field_146289_q.getStringWidth(s);
|
||||
|
||||
if (l > k)
|
||||
{
|
||||
@@ -324,7 +324,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
||||
{
|
||||
String s1 = (String) par1List.get(k2);
|
||||
this.fontRenderer.drawStringWithShadow(s1, i1, j1, -1);
|
||||
this.field_146289_q.drawStringWithShadow(s1, i1, j1, -1);
|
||||
|
||||
if (k2 == 0)
|
||||
{
|
||||
@@ -430,8 +430,8 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.field_146297_k.renderEngine, itemstack, i, j, s);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(this.field_146289_q, this.field_146297_k.renderEngine, itemstack, i, j);
|
||||
itemRenderer.renderItemOverlayIntoGUI(this.field_146289_q, this.field_146297_k.renderEngine, itemstack, i, j, s);
|
||||
}
|
||||
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
|
||||
@@ -39,10 +39,10 @@ public class PartCrafterGui extends NewContainerGui
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("crafters.PartBuilder"), 6, 6, 4210752);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("crafters.PartBuilder"), 6, 6, 4210752);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
if (drawChestPart)
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("inventory.PatternChest"), -108, this.ySize - 148, 4210752);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("inventory.PatternChest"), -108, this.ySize - 148, 4210752);
|
||||
|
||||
drawMaterialInformation();
|
||||
}
|
||||
@@ -50,8 +50,8 @@ public class PartCrafterGui extends NewContainerGui
|
||||
void drawDefaultInformation ()
|
||||
{
|
||||
title = "\u00A7n" + StatCollector.translateToLocal("gui.partcrafter2");
|
||||
this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 16777215);
|
||||
fontRenderer.drawSplitString(StatCollector.translateToLocal("gui.partcrafter3"), xSize + 8, 24, 115, 16777215);
|
||||
this.drawCenteredString(field_146289_q, title, xSize + 63, 8, 16777215);
|
||||
field_146289_q.drawSplitString(StatCollector.translateToLocal("gui.partcrafter3"), xSize + 8, 24, 115, 16777215);
|
||||
}
|
||||
|
||||
void drawMaterialInformation ()
|
||||
@@ -93,34 +93,34 @@ public class PartCrafterGui extends NewContainerGui
|
||||
int offset = 8;
|
||||
if (hasTop)
|
||||
{
|
||||
this.drawCenteredString(fontRenderer, title, xSize + 63, offset, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter4") + topEnum.durability(), xSize + 8, offset + 16, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter5") + topEnum.handleDurability() + "x", xSize + 8, offset + 27, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter6") + topEnum.toolSpeed() / 100f, xSize + 8, offset + 38, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter7") + getHarvestLevelName(topEnum.harvestLevel()), xSize + 8, offset + 49, 16777215);
|
||||
this.drawCenteredString(field_146289_q, title, xSize + 63, offset, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter4") + topEnum.durability(), xSize + 8, offset + 16, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter5") + topEnum.handleDurability() + "x", xSize + 8, offset + 27, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter6") + topEnum.toolSpeed() / 100f, xSize + 8, offset + 38, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter7") + getHarvestLevelName(topEnum.harvestLevel()), xSize + 8, offset + 49, 16777215);
|
||||
|
||||
int attack = topEnum.attack();
|
||||
String heart = attack == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
|
||||
if (attack % 2 == 0)
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2 + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2 + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
else
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2f + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2f + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
}
|
||||
|
||||
offset = 90;
|
||||
if (hasBottom)
|
||||
{
|
||||
this.drawCenteredString(fontRenderer, otherTitle, xSize + 63, offset, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter4") + bottomEnum.durability(), xSize + 8, offset + 16, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter5") + bottomEnum.handleDurability() + "x", xSize + 8, offset + 27, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter6") + bottomEnum.toolSpeed() / 100f, xSize + 8, offset + 38, 16777215);
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter7") + getHarvestLevelName(bottomEnum.harvestLevel()), xSize + 8, offset + 49, 16777215);
|
||||
this.drawCenteredString(field_146289_q, otherTitle, xSize + 63, offset, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter4") + bottomEnum.durability(), xSize + 8, offset + 16, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter5") + bottomEnum.handleDurability() + "x", xSize + 8, offset + 27, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter6") + bottomEnum.toolSpeed() / 100f, xSize + 8, offset + 38, 16777215);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter7") + getHarvestLevelName(bottomEnum.harvestLevel()), xSize + 8, offset + 49, 16777215);
|
||||
int attack = bottomEnum.attack();
|
||||
String heart = attack == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
|
||||
if (attack % 2 == 0)
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2 + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2 + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
else
|
||||
this.fontRenderer.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2f + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
this.field_146289_q.drawString(StatCollector.translateToLocal("gui.partcrafter10") + attack / 2f + heart, xSize + 8, offset + 60, 0xffffff);
|
||||
}
|
||||
|
||||
if (!hasTop && !hasBottom)
|
||||
@@ -156,7 +156,7 @@ public class PartCrafterGui extends NewContainerGui
|
||||
{
|
||||
// Draw the background
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
@@ -190,7 +190,7 @@ public class PartCrafterGui extends NewContainerGui
|
||||
|
||||
// Draw description
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(description);
|
||||
this.field_146297_k.getTextureManager().bindTexture(description);
|
||||
cornerX = (this.width + this.xSize) / 2;
|
||||
cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 126, 0, 126, this.ySize);
|
||||
@@ -224,15 +224,15 @@ public class PartCrafterGui extends NewContainerGui
|
||||
k1 = -999;
|
||||
}
|
||||
|
||||
if (this.mc.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
this.mc.displayGuiScreen((GuiScreen) null);
|
||||
this.field_146297_k.displayGuiScreen((GuiScreen) null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (k1 != -1)
|
||||
{
|
||||
if (this.mc.gameSettings.touchscreen)
|
||||
if (this.field_146297_k.gameSettings.touchscreen)
|
||||
{
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
@@ -247,9 +247,9 @@ public class PartCrafterGui extends NewContainerGui
|
||||
}
|
||||
else if (!this.field_94076_q)
|
||||
{
|
||||
if (this.mc.thePlayer.inventory.getItemStack() == null)
|
||||
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
|
||||
{
|
||||
if (clickNum == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
if (clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
|
||||
{
|
||||
this.handleMouseClick(slot, k1, clickNum, 3);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ public class PatternChestGui extends GuiContainer
|
||||
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("inventory.PatternChest"), 60, 6, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("inventory.PatternChest"), 60, 6, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/patternchest.png");
|
||||
@@ -33,7 +33,7 @@ public class PatternChestGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (width - xSize) / 2;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
{
|
||||
super((ActiveContainer) smeltery.getGuiContainer(inventoryplayer, world, x, y, z));
|
||||
logic = smeltery;
|
||||
username = inventoryplayer.player.username;
|
||||
username = inventoryplayer.player.getDisplayName();
|
||||
xSize = 248;
|
||||
smeltery.updateFuelDisplay();
|
||||
}
|
||||
@@ -102,8 +102,8 @@ public class SmelteryGui extends NewContainerGui
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer (int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 86, 5, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 90, (ySize - 96) + 2, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 86, 5, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 90, (ySize - 96) + 2, 0x404040);
|
||||
|
||||
int base = 0;
|
||||
int cornerX = (width - xSize) / 2 + 36;
|
||||
@@ -158,7 +158,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
protected void drawGuiContainerBackgroundLayer (float f, int mouseX, int mouseY)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (width - xSize) / 2 + 36;
|
||||
int cornerY = (height - ySize) / 2;
|
||||
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize);
|
||||
@@ -214,12 +214,12 @@ public class SmelteryGui extends NewContainerGui
|
||||
//Liquid gague
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52);
|
||||
|
||||
//Side inventory
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(backgroundSide);
|
||||
this.field_146297_k.getTextureManager().bindTexture(backgroundSide);
|
||||
if (logic.layers > 0)
|
||||
{
|
||||
if (logic.layers == 1)
|
||||
@@ -258,7 +258,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
protected void drawFluidStackTooltip (FluidStack par1ItemStack, int par2, int par3)
|
||||
{
|
||||
this.zLevel = 100;
|
||||
List list = getLiquidTooltip(par1ItemStack, this.mc.gameSettings.advancedItemTooltips);
|
||||
List list = getLiquidTooltip(par1ItemStack, this.field_146297_k.gameSettings.advancedItemTooltips);
|
||||
|
||||
for (int k = 0; k < list.size(); ++k)
|
||||
{
|
||||
@@ -344,7 +344,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
String s = (String) iterator.next();
|
||||
int l = this.fontRenderer.getStringWidth(s);
|
||||
int l = this.field_146289_q.getStringWidth(s);
|
||||
|
||||
if (l > k)
|
||||
{
|
||||
@@ -389,7 +389,7 @@ public class SmelteryGui extends NewContainerGui
|
||||
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
||||
{
|
||||
String s1 = (String) par1List.get(k2);
|
||||
this.fontRenderer.drawStringWithShadow(s1, i1, j1, -1);
|
||||
this.field_146289_q.drawStringWithShadow(s1, i1, j1, -1);
|
||||
|
||||
if (k2 == 0)
|
||||
{
|
||||
|
||||
@@ -41,8 +41,8 @@ public class StencilTableGui extends GuiContainer
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer (int par1, int par2)
|
||||
{
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("crafters.PatternShaper"), 50, 6, 0x404040);
|
||||
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("crafters.PatternShaper"), 50, 6, 0x404040);
|
||||
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
}
|
||||
|
||||
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/patternshaper.png");
|
||||
@@ -50,7 +50,7 @@ public class StencilTableGui extends GuiContainer
|
||||
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
|
||||
{
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(background);
|
||||
this.field_146297_k.getTextureManager().bindTexture(background);
|
||||
int cornerX = (this.width - this.xSize) / 2;
|
||||
int cornerY = (this.height - this.ySize) / 2;
|
||||
this.drawTexturedModalRect(cornerX, cornerY, 0, 0, this.xSize, this.ySize);
|
||||
|
||||
Reference in new issue
Block a user