diff --git a/src/main/java/mapeper/ticonautotoolstation/AutoToolStationBlock.java b/src/main/java/mapeper/ticonautotoolstation/AutoToolStationBlock.java index 43a1785..c951ab8 100644 --- a/src/main/java/mapeper/ticonautotoolstation/AutoToolStationBlock.java +++ b/src/main/java/mapeper/ticonautotoolstation/AutoToolStationBlock.java @@ -1,10 +1,14 @@ package mapeper.ticonautotoolstation; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; import net.minecraft.world.World; //Thanks to http://www.minecraftforge.net/wiki/Containers_and_GUIs @@ -32,4 +36,26 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p return true; } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) + { + if (side == 1) { + //Top + return icon[1]; + } + return icon[0]; + } + + IIcon[] icon; + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister register) + { + icon = new IIcon[2]; + icon[0] = register.registerIcon("autotoolstation:autotoolstation/sides"); + icon[1] = register.registerIcon("tinker:toolforge_top"); + //https://github.com/SlimeKnights/TinkersConstruct/blob/master/resources/assets/tinker/textures/blocks/toolforge_top.png + } } diff --git a/src/main/resources/assets/autotoolstation/textures/blocks/autotoolstation/sides.png b/src/main/resources/assets/autotoolstation/textures/blocks/autotoolstation/sides.png new file mode 100644 index 0000000..5d7781e Binary files /dev/null and b/src/main/resources/assets/autotoolstation/textures/blocks/autotoolstation/sides.png differ