2016-01-12 17:23:26 +00:00
|
|
|
package WayofTime.bloodmagic.block;
|
|
|
|
|
2016-01-18 02:00:48 +00:00
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2016-01-12 17:23:26 +00:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2016-01-18 02:00:48 +00:00
|
|
|
import net.minecraft.util.BlockPos;
|
|
|
|
import net.minecraft.util.EnumFacing;
|
2016-01-12 17:23:26 +00:00
|
|
|
import net.minecraft.world.World;
|
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
2016-01-14 20:03:13 +00:00
|
|
|
import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode;
|
2016-01-12 17:23:26 +00:00
|
|
|
|
2016-02-06 22:36:37 +00:00
|
|
|
public class BlockMasterRoutingNode extends BlockRoutingNode
|
2016-01-12 17:23:26 +00:00
|
|
|
{
|
|
|
|
public BlockMasterRoutingNode()
|
|
|
|
{
|
2016-02-06 22:36:37 +00:00
|
|
|
super();
|
2016-01-12 17:23:26 +00:00
|
|
|
|
|
|
|
setUnlocalizedName(Constants.Mod.MODID + ".masterRouting");
|
2016-01-19 06:34:12 +00:00
|
|
|
setRegistryName(Constants.BloodMagicBlock.MASTER_ROUTING_NODE.getRegName());
|
2016-01-12 17:23:26 +00:00
|
|
|
setCreativeTab(BloodMagic.tabBloodMagic);
|
|
|
|
setHardness(2.0F);
|
|
|
|
setResistance(5.0F);
|
|
|
|
setHarvestLevel("pickaxe", 2);
|
|
|
|
}
|
|
|
|
|
2016-01-12 22:05:56 +00:00
|
|
|
@Override
|
|
|
|
public int getRenderType()
|
|
|
|
{
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
|
2016-01-12 17:23:26 +00:00
|
|
|
@Override
|
|
|
|
public TileEntity createNewTileEntity(World worldIn, int meta)
|
|
|
|
{
|
|
|
|
return new TileMasterRoutingNode();
|
|
|
|
}
|
2016-01-18 02:00:48 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
|
|
|
{
|
|
|
|
if (world.getTileEntity(pos) instanceof TileMasterRoutingNode)
|
|
|
|
{
|
|
|
|
player.openGui(BloodMagic.instance, Constants.Gui.MASTER_ROUTING_NODE_GUI, world, pos.getX(), pos.getY(), pos.getZ());
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2016-01-12 17:23:26 +00:00
|
|
|
}
|