package de.maxhenkel.skycraft.blocks.gui;

import de.maxhenkel.skycraft.SkyCraft;
import de.maxhenkel.skycraft.blocks.tileentity.TileEntityOreWasher;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;

public class GUIHandler implements IGuiHandler{

    @Override
    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        switch(ID){
        case SkyCraft.GUI_OREWASHER:
            return new ContainerOreWasher(player.inventory, (TileEntityOreWasher) world.getTileEntity(new BlockPos(x, y, z)));
        default:
            return null;
        }
    }

    @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        switch(ID){
        case SkyCraft.GUI_OREWASHER:
            return new GUIOreWasher(new ContainerOreWasher(player.inventory, (TileEntityOreWasher) world.getTileEntity(new BlockPos(x, y, z))));
        default:
            return null;
        }
    }

}