diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-04-07 20:42:08 -0500 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-04-07 20:42:08 -0500 |
| commit | 0b2be854e8e7ebd0a08b3eba80510adef57dea0d (patch) | |
| tree | 40e4507fc85b51024e8694b0fb8d9c6d22747034 /src/main/java/gmail/Lance5057/armor | |
| parent | 14504bab9a99161b597fdd7da1993f0019384ff8 (diff) | |
Kinda forgot to update github...
Diffstat (limited to 'src/main/java/gmail/Lance5057/armor')
| -rw-r--r-- | src/main/java/gmail/Lance5057/armor/blocks/ArmorAnvil.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/gmail/Lance5057/armor/blocks/ArmorAnvil.java b/src/main/java/gmail/Lance5057/armor/blocks/ArmorAnvil.java new file mode 100644 index 0000000..c6aa286 --- /dev/null +++ b/src/main/java/gmail/Lance5057/armor/blocks/ArmorAnvil.java @@ -0,0 +1,50 @@ +package gmail.Lance5057.armor.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gmail.Lance5057.tileentities.TileEntity_ArmorAnvil; +import gmail.Lance5057.tileentities.TileEntity_CrestMount; +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 ArmorAnvil extends Block implements ITileEntityProvider +{ + + public ArmorAnvil() { + 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. + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister icon) { + this.blockIcon = icon.registerIcon("tinkersdefense:WIP"); + } + + @Override + public TileEntity createNewTileEntity(World w, int md) { + TileEntity_ArmorAnvil te = new TileEntity_ArmorAnvil(); + return te; + } +} |
