use of buildcraft.robotics.gui.ContainerRequester in project BuildCraft by BuildCraft.
the class RoboticsGuiHandler method getServerGuiElement.
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
BlockPos pos = new BlockPos(x, y, z);
if (!world.isBlockLoaded(pos)) {
return null;
}
TileEntity tile = world.getTileEntity(pos);
switch(id) {
case GuiIds.MAP:
if (!(tile instanceof TileZonePlan)) {
return null;
} else {
return new ContainerZonePlan(player, (TileZonePlan) tile);
}
case GuiIds.REQUESTER:
if (!(tile instanceof TileRequester)) {
return null;
} else {
return new ContainerRequester(player, (TileRequester) tile);
}
default:
return null;
}
}
Aggregations