mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-23 21:49:45 +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 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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user