From dea6174738097875bc96e9a0e837cc67d5c086f0 Mon Sep 17 00:00:00 2001 From: MaPePeR Date: Thu, 13 Aug 2015 20:34:46 +0200 Subject: [PATCH] Add horrible side texture and use toolforge-top. --- .../AutoToolStationBlock.java | 26 ++++++++++++++++++ .../textures/blocks/autotoolstation/sides.png | Bin 0 -> 382 bytes 2 files changed, 26 insertions(+) create mode 100644 src/main/resources/assets/autotoolstation/textures/blocks/autotoolstation/sides.png 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 0000000000000000000000000000000000000000..5d7781ebee5eb4418a4dc24b4eff4180493c36cf GIT binary patch literal 382 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#J_oOmD09q?@NYmN+02lL66gHf+|;}hAeVu`xhOTUBsE2$JhLQ2!QIn0AVn{g z9Vq_A)5S4F<9uw8=cFSBJWk&GF8%)>uVcu5sU)kW=wyRHQH|aFjv0~+cWcjezGrmU zwCbGYOwNQfsRQr03h$SvxwXvmbYt;MWC#hJbjD{=)e5b<<>lo^S854*EL$b??%my~ zdvtbQegA2i$T^|wr5~%G7%Nq!T?ssPWWCnW1UrV(4DJ^k%OzMQZ8O+?`w*Ht)78&qol`;+0I1fO6#xJL literal 0 HcmV?d00001