2016-01-16 02:53:55 +00:00
|
|
|
package WayofTime.bloodmagic.block;
|
|
|
|
|
2017-08-15 03:53:42 +00:00
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
2016-01-16 02:53:55 +00:00
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2016-03-18 17:16:38 +00:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2016-01-16 02:53:55 +00:00
|
|
|
import net.minecraft.world.World;
|
2016-03-18 17:16:38 +00:00
|
|
|
import WayofTime.bloodmagic.tile.routing.TileItemRoutingNode;
|
|
|
|
import WayofTime.bloodmagic.tile.routing.TileRoutingNode;
|
2016-01-16 02:53:55 +00:00
|
|
|
|
2017-01-02 08:10:28 +00:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2016-01-16 02:53:55 +00:00
|
|
|
public class BlockItemRoutingNode extends BlockRoutingNode
|
|
|
|
{
|
|
|
|
public BlockItemRoutingNode()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
|
2017-08-15 03:53:42 +00:00
|
|
|
setUnlocalizedName(BloodMagic.MODID + ".itemRouting");
|
2016-01-16 02:53:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
|
|
|
{
|
|
|
|
TileEntity tile = world.getTileEntity(pos);
|
|
|
|
if (tile instanceof TileRoutingNode)
|
|
|
|
{
|
|
|
|
((TileRoutingNode) tile).removeAllConnections();
|
|
|
|
}
|
|
|
|
super.breakBlock(world, pos, state);
|
|
|
|
}
|
2017-01-02 08:10:28 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean hasTileEntity(IBlockState state) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
@Override
|
|
|
|
public TileEntity createTileEntity(World world, IBlockState state) {
|
|
|
|
return new TileItemRoutingNode();
|
|
|
|
}
|
2016-01-16 02:53:55 +00:00
|
|
|
}
|