diff options
| author | Lance5057 <Lance5057@gmail.com> | 2015-01-21 20:04:34 -0600 |
|---|---|---|
| committer | Lance5057 <Lance5057@gmail.com> | 2015-01-21 20:04:34 -0600 |
| commit | b4eb8f2d65c62afccc898808b44fdddfde0c15d1 (patch) | |
| tree | ee3a9f47a22418a6778c299cc96b4fedc2265afe /src/main/java/gmail/Lance5057/blocks/CrestMount.java | |
| parent | 39642dce74d23f025b71d5766c1ac8489a41a802 (diff) | |
Startup
I hope I'm doing this right...
Diffstat (limited to 'src/main/java/gmail/Lance5057/blocks/CrestMount.java')
| -rw-r--r-- | src/main/java/gmail/Lance5057/blocks/CrestMount.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/gmail/Lance5057/blocks/CrestMount.java b/src/main/java/gmail/Lance5057/blocks/CrestMount.java new file mode 100644 index 0000000..a318c77 --- /dev/null +++ b/src/main/java/gmail/Lance5057/blocks/CrestMount.java @@ -0,0 +1,43 @@ +package gmail.Lance5057.blocks; + +import net.minecraft.block.BlockContainer; +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 CrestMount extends BlockContainer { + //Treat it like a normal block here. The Block Bounds are a good idea - the first three are X Y and Z of the botton-left corner, + //And the second three are the top-right corner. + public CrestMount() { + super(Material.iron); + this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); + } + + //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) { + this.blockIcon = icon.registerIcon("tinkersdefense:textures/items/QueensGoldIngot.png"); + } + + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { + return new TileEntity_CrestMount(); + } +} |
