diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-03-13 08:15:33 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-03-13 08:15:33 -0500 |
| commit | afb474545246da88084a43cae31259c33e63a8d1 (patch) | |
| tree | df0e220a3568546b7c64bf56e00c8d6af24fed64 /src/main/java/gmail/Lance5057/blocks/JewelersBench.java | |
| parent | 495fc1d710df9f5b98fec0d0f61f105811742d89 (diff) | |
Updated to TiCo 1.8.3 and fixed the rendering issues that followed.
Also refactored some codes.
Diffstat (limited to 'src/main/java/gmail/Lance5057/blocks/JewelersBench.java')
| -rw-r--r-- | src/main/java/gmail/Lance5057/blocks/JewelersBench.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/main/java/gmail/Lance5057/blocks/JewelersBench.java b/src/main/java/gmail/Lance5057/blocks/JewelersBench.java new file mode 100644 index 0000000..af9ca1c --- /dev/null +++ b/src/main/java/gmail/Lance5057/blocks/JewelersBench.java @@ -0,0 +1,47 @@ +package gmail.Lance5057.blocks; + +import gmail.Lance5057.tileentities.TileEntity_JewelersBench; +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.tileentity.TileEntity; +import net.minecraft.world.World; + +public class JewelersBench extends Block implements ITileEntityProvider +{ + + public JewelersBench() { + super(Material.iron); + } + + //You don't want the normal render type, or it wont render properly. + @Override + public int getRenderType() { + return -1; + } + + //It's not an opaque cube, so you need this. + @Override + public boolean isOpaqueCube() { + return false; + } + + //It's not a normal block, so you need this too. + public boolean renderAsNormalBlock() { + return false; + } + + //This is the icon to use for showing the block in your hand. + public void registerIcons(IIconRegister icon) { + //TODO fix the icon + this.blockIcon = icon.registerIcon("tinkersdefense:textures/items/QueensGoldIngot.png"); + } + + @Override + public TileEntity createNewTileEntity(World w, int md) { + TileEntity_JewelersBench te = new TileEntity_JewelersBench(); + return te; + } + +} |
