Search in sources :

Example 1 with GuiTeleporter

use of net.dyeo.teleporter.client.gui.inventory.GuiTeleporter in project VanillaTeleporter by dyeo.

the class GuiHandler method getClientGuiElement.

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    if (ID == GUI_ID_TELEPORTER) {
        BlockPos pos = new BlockPos(x, y, z);
        TileEntity tileentity = world.getTileEntity(pos);
        if (tileentity instanceof TileEntityTeleporter) {
            TileEntityTeleporter tileentityteleporter = (TileEntityTeleporter) tileentity;
            return new GuiTeleporter(player.inventory, tileentityteleporter);
        }
    }
    return null;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) GuiTeleporter(net.dyeo.teleporter.client.gui.inventory.GuiTeleporter) BlockPos(net.minecraft.util.math.BlockPos) TileEntityTeleporter(net.dyeo.teleporter.tileentity.TileEntityTeleporter)

Aggregations

GuiTeleporter (net.dyeo.teleporter.client.gui.inventory.GuiTeleporter)1 TileEntityTeleporter (net.dyeo.teleporter.tileentity.TileEntityTeleporter)1 TileEntity (net.minecraft.tileentity.TileEntity)1 BlockPos (net.minecraft.util.math.BlockPos)1