Added Lathe

This commit is contained in:
Gig 2015-05-08 00:15:04 +01:00
parent c6e3dfaf82
commit 2157fe1cb4
8 changed files with 232 additions and 0 deletions

View file

@ -17,6 +17,7 @@ import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileBlastFurnace;
import techreborn.tiles.TileLathe;
import techreborn.tiles.TileMachineCasing;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -47,6 +48,22 @@ public class BlockLathe extends BlockMachineBase {
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
}
@Override
public TileEntity createNewTileEntity(World world, int p_149915_2_)
{
return new TileLathe();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z,
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
{
if (!player.isSneaking())
player.openGui(Core.INSTANCE, GuiHandler.latheID, world, x, y,
z);
return true;
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata)