summaryrefslogtreecommitdiff
path: root/src/main/java/lance5057/tDefense/blocks
diff options
context:
space:
mode:
authorLance5057 <Lance5057@gmail.com>2015-10-05 00:02:32 -0500
committerLance5057 <Lance5057@gmail.com>2015-10-15 04:54:18 -0500
commitd67ec64707414df6f78f45ec1710b4ec3fc1ef66 (patch)
tree6a926cb12990aa88cb62e8ec099045f5b54fd8b1 /src/main/java/lance5057/tDefense/blocks
parentadefc630eb6876c19660c4f51876cc9bf00d78f0 (diff)
Refactor and Compartmentalize all the codes!
Diffstat (limited to 'src/main/java/lance5057/tDefense/blocks')
-rw-r--r--src/main/java/lance5057/tDefense/blocks/JewelersBench.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/lance5057/tDefense/blocks/JewelersBench.java b/src/main/java/lance5057/tDefense/blocks/JewelersBench.java
new file mode 100644
index 0000000..e224675
--- /dev/null
+++ b/src/main/java/lance5057/tDefense/blocks/JewelersBench.java
@@ -0,0 +1,50 @@
+package lance5057.tDefense.blocks;
+
+import lance5057.tDefense.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;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+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.
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void registerBlockIcons(IIconRegister icon) {
+ this.blockIcon = icon.registerIcon("tinkersdefense:WIP");
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(World w, int md) {
+ TileEntity_JewelersBench te = new TileEntity_JewelersBench();
+ return te;
+ }
+
+}