New textures for metal caster

This commit is contained in:
Calclavia 2014-02-16 21:28:08 +08:00
parent 7e94dbee68
commit 1cbfa10eea
6 changed files with 14 additions and 17 deletions

View file

@ -17,7 +17,9 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockCast extends BlockTile public class BlockCast extends BlockTile
{ {
Icon top; Icon topIcon;
Icon side1Icon;
Icon side2Icon;
public BlockCast(int id) public BlockCast(int id)
{ {
@ -29,28 +31,24 @@ public class BlockCast extends BlockTile
@Override @Override
public void registerIcons(IconRegister iconReg) public void registerIcons(IconRegister iconReg)
{ {
this.top = iconReg.registerIcon(Reference.PREFIX + "material_wood_top"); topIcon = iconReg.registerIcon(Reference.PREFIX + "metalCast_top");
side1Icon = iconReg.registerIcon(Reference.PREFIX + "metalCast_side_1");
side2Icon = iconReg.registerIcon(Reference.PREFIX + "metalCast_side_2");
super.registerIcons(iconReg); super.registerIcons(iconReg);
} }
@Override
@SideOnly(Side.CLIENT)
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
return getIcon(side, 0);
}
/** Returns the block texture based on the side being looked at. Args: side */ /** Returns the block texture based on the side being looked at. Args: side */
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public Icon getIcon(int side, int meta) public Icon getIcon(int side, int meta)
{ {
if (side == 1) if (side == 0)
{
return top;
}
return blockIcon; return blockIcon;
if (side == 1)
return topIcon;
return side % 2 == 0 ? side1Icon : side2Icon;
} }
@Override @Override
@ -60,7 +58,6 @@ public class BlockCast extends BlockTile
if (tile != null) if (tile != null)
tile.updateEntity(); tile.updateEntity();
} }
@Override @Override

View file

@ -17,7 +17,7 @@ public class RenderCast extends RenderItemOverlayTile
if (tileEntity instanceof TileCast) if (tileEntity instanceof TileCast)
{ {
TileCast tile = (TileCast) tileEntity; TileCast tile = (TileCast) tileEntity;
renderItemOnSides(tileEntity, tile.getStackInSlot(0), x, y, z, "Empty"); renderItemOnSides(tileEntity, tile.getStackInSlot(0), x, y, z, "");
} }
} }
} }

View file

@ -17,7 +17,7 @@ public class RenderMillstone extends RenderItemOverlayTile
if (tileEntity instanceof TileMillstone) if (tileEntity instanceof TileMillstone)
{ {
TileMillstone tile = (TileMillstone) tileEntity; TileMillstone tile = (TileMillstone) tileEntity;
renderItemOnSides(tileEntity, tile.getStackInSlot(0), x, y, z, "Empty"); renderItemOnSides(tileEntity, tile.getStackInSlot(0), x, y, z, "");
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B