001/*
002 * Forge Mod Loader
003 * Copyright (c) 2012-2013 cpw.
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser Public License v2.1
006 * which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
008 * 
009 * Contributors:
010 *     cpw - implementation
011 */
012
013package cpw.mods.fml.common.network;
014
015import net.minecraft.entity.player.EntityPlayer;
016import net.minecraft.world.World;
017
018public interface IGuiHandler
019{
020    /**
021     * Returns a Server side Container to be displayed to the user.
022     * 
023     * @param ID
024     *            The Gui ID Number
025     * @param player
026     *            The player viewing the Gui
027     * @param world
028     *            The current world
029     * @param x
030     *            X Position
031     * @param y
032     *            Y Position
033     * @param z
034     *            Z Position
035     * @return A GuiScreen/Container to be displayed to the user, null if none.
036     */
037    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
038    /**
039     * Returns a Container to be displayed to the user. On the client side, this
040     * needs to return a instance of GuiScreen On the server side, this needs to
041     * return a instance of Container
042     * 
043     * @param ID
044     *            The Gui ID Number
045     * @param player
046     *            The player viewing the Gui
047     * @param world
048     *            The current world
049     * @param x
050     *            X Position
051     * @param y
052     *            Y Position
053     * @param z
054     *            Z Position
055     * @return A GuiScreen/Container to be displayed to the user, null if none.
056     */
057    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
058}