add block bounds to cable

This commit is contained in:
Raoul Van den Berge
2016-01-03 14:31:25 +01:00
parent 2821d6fce2
commit 35556f89fb
2 changed files with 11 additions and 1 deletions

View File

@@ -10,6 +10,10 @@ public class BlockCable extends BlockBase
public BlockCable() public BlockCable()
{ {
super("cable"); super("cable");
float pixel = 1F / 16F;
setBlockBounds(4 * pixel, 4 * pixel, 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel, 1 - 4 * pixel);
} }
@Override @Override
@@ -42,6 +46,12 @@ public class BlockCable extends BlockBase
return false; return false;
} }
@Override
public boolean isNormalCube()
{
return false;
}
@Override @Override
public boolean isVisuallyOpaque() public boolean isVisuallyOpaque()
{ {

View File

@@ -20,7 +20,7 @@ public class BlockCableRenderer extends TileEntitySpecialRenderer<TileCable>
public void renderTileEntityAt(TileCable tile, double x, double y, double z, float scale, int a) public void renderTileEntityAt(TileCable tile, double x, double y, double z, float scale, int a)
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) x, (float) y, (float) z); GL11.glTranslated(x, y, z);
model.render(tile); model.render(tile);