Search in sources :

Example 1 with ContainerFarm

use of forestry.farming.gui.ContainerFarm in project ForestryMC by ForestryMC.

the class GuiHandlerFarming method getServerGuiElement.

@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
    if (id >= GuiId.values().length) {
        return null;
    }
    switch(GuiId.values()[id]) {
        case MultiFarmGUI:
            TileFarmPlain tile = (TileFarmPlain) getTileForestry(world, x, y, z);
            Proxies.net.sendToPlayer(new PacketSocketUpdate(PacketIds.SOCKET_UPDATE, x, y, z, tile), player);
            return new ContainerFarm(player.inventory, tile);
        default:
            return null;
    }
}
Also used : ContainerFarm(forestry.farming.gui.ContainerFarm) PacketSocketUpdate(forestry.core.network.PacketSocketUpdate) TileFarmPlain(forestry.farming.gadgets.TileFarmPlain)

Aggregations

PacketSocketUpdate (forestry.core.network.PacketSocketUpdate)1 TileFarmPlain (forestry.farming.gadgets.TileFarmPlain)1 ContainerFarm (forestry.farming.gui.ContainerFarm)1