Added a GUI to the master routing node to get a feel for what the routing system will be like. It's... WIP.

This commit is contained in:
WayofTime 2016-01-17 21:00:48 -05:00
parent 34d24c85dc
commit 01fcec9a8c
7 changed files with 97 additions and 1 deletions

View file

@ -2,7 +2,11 @@ package WayofTime.bloodmagic.block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
@ -32,4 +36,15 @@ public class BlockMasterRoutingNode extends BlockContainer
{
return new TileMasterRoutingNode();
}
@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;
}
}