Search in sources :

Example 1 with GuiRFToolsManual

use of mcjty.rftoolsdim.items.manual.GuiRFToolsManual in project RFToolsDimensions by McJty.

the class GuiProxy method getClientGuiElement.

@Override
public Object getClientGuiElement(int guiid, EntityPlayer entityPlayer, World world, int x, int y, int z) {
    if (guiid == RFToolsDim.GUI_MANUAL_DIMENSION) {
        return new GuiRFToolsManual(GuiRFToolsManual.MANUAL_DIMENSION);
    }
    //        if (guiid == RFTools.GUI_MANUAL_MAIN) {
    //            return new GuiRFToolsManual(GuiRFToolsManual.MANUAL_MAIN);
    //        } else if (guiid == RFTools.GUI_TELEPORTPROBE) {
    //            return new GuiTeleportProbe();
    //        } else if (guiid == RFTools.GUI_ADVANCEDPORTER) {
    //            return new GuiAdvancedPorter();
    //        } else if (guiid == RFTools.GUI_REMOTE_STORAGE_ITEM) {
    //            return new GuiModularStorage(new RemoteStorageItemContainer(entityPlayer));
    //        } else if (guiid == RFTools.GUI_MODULAR_STORAGE_ITEM) {
    //            return new GuiModularStorage(new ModularStorageItemContainer(entityPlayer));
    //        } else if (guiid == RFTools.GUI_STORAGE_FILTER) {
    //            return new GuiStorageFilter(new StorageFilterContainer(entityPlayer));
    //        }
    BlockPos pos = new BlockPos(x, y, z);
    Block block = world.getBlockState(pos).getBlock();
    if (block instanceof GenericBlock) {
        GenericBlock genericBlock = (GenericBlock) block;
        TileEntity te = world.getTileEntity(pos);
        return genericBlock.createClientGui(entityPlayer, te);
    }
    return null;
}
Also used : GenericBlock(mcjty.lib.container.GenericBlock) TileEntity(net.minecraft.tileentity.TileEntity) GenericBlock(mcjty.lib.container.GenericBlock) Block(net.minecraft.block.Block) BlockPos(net.minecraft.util.math.BlockPos) GuiRFToolsManual(mcjty.rftoolsdim.items.manual.GuiRFToolsManual)

Aggregations

GenericBlock (mcjty.lib.container.GenericBlock)1 GuiRFToolsManual (mcjty.rftoolsdim.items.manual.GuiRFToolsManual)1 Block (net.minecraft.block.Block)1 TileEntity (net.minecraft.tileentity.TileEntity)1 BlockPos (net.minecraft.util.math.BlockPos)1