summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block
diff options
context:
space:
mode:
Diffstat (limited to 'common/darkknight/jewelrycraft/block')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockList.java5
-rw-r--r--common/darkknight/jewelrycraft/block/BlockMolder.java31
2 files changed, 36 insertions, 0 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockList.java b/common/darkknight/jewelrycraft/block/BlockList.java
index e29287d..f783d84 100644
--- a/common/darkknight/jewelrycraft/block/BlockList.java
+++ b/common/darkknight/jewelrycraft/block/BlockList.java
@@ -7,7 +7,9 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.config.ConfigHandler;
+import darkknight.jewelrycraft.renders.TileEntityMolderRender;
import darkknight.jewelrycraft.renders.TileEntitySmelterRender;
+import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import darkknight.jewelrycraft.tileentity.TileEntitySmelter;
public class BlockList
@@ -34,7 +36,10 @@ public class BlockList
GameRegistry.registerBlock(jewelCraftingTable, "jewelCraftingTable");
GameRegistry.registerTileEntity(TileEntitySmelter.class, "30");
+ GameRegistry.registerTileEntity(TileEntityMolder.class, "31");
+
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmelter.class, new TileEntitySmelterRender());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender());
}
}
}
diff --git a/common/darkknight/jewelrycraft/block/BlockMolder.java b/common/darkknight/jewelrycraft/block/BlockMolder.java
index 05b7b0a..1292f2a 100644
--- a/common/darkknight/jewelrycraft/block/BlockMolder.java
+++ b/common/darkknight/jewelrycraft/block/BlockMolder.java
@@ -3,7 +3,10 @@ package darkknight.jewelrycraft.block;
import darkknight.jewelrycraft.tileentity.TileEntityMolder;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockMolder extends BlockContainer
@@ -11,6 +14,7 @@ public class BlockMolder extends BlockContainer
protected BlockMolder(int par1, Material par2Material)
{
super(par1, par2Material);
+ this.setBlockBounds(0.1F, 0F, 0.1F, 0.9F, 0.2F, 0.9F);
}
@Override
@@ -24,4 +28,31 @@ public class BlockMolder extends BlockContainer
{
return false;
}
+
+ @Override
+ public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityPlayer, int par6, float par7, float par8, float par9)
+ {
+ TileEntityMolder te = (TileEntityMolder) world.getBlockTileEntity(i, j, k);
+ return true;
+ }
+ public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
+ {
+ return false;
+ }
+
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ @Override
+ public int getRenderType()
+ {
+ return -1;
+ }
+
+ public void registerIcons(IconRegister icon)
+ {
+ this.blockIcon = icon.registerIcon("jewelrycraft:molder");
+ }
}