diff --git a/forge/forge_client/src/net/minecraft/src/forge/IGuiHandler.java b/forge/forge_client/src/net/minecraft/src/forge/IGuiHandler.java deleted file mode 100644 index 1ce25b17b..000000000 --- a/forge/forge_client/src/net/minecraft/src/forge/IGuiHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.minecraft.src.forge; - -import net.minecraft.src.EntityPlayerSP; -import net.minecraft.src.GuiScreen; -import net.minecraft.src.World; - -public interface IGuiHandler -{ - /** - * Returns a GuiScreen to be displayed to the user. This is client side - * - * @param ID The Gui ID Number - * @param player The player viewing the Gui - * @param world The current world - * @param X X Position - * @param Y Y Position - * @param Z Z Position - * @return A GuiScreen to be displayed to the user, null if none. - */ - public GuiScreen getGuiScreen(int ID, EntityPlayerSP player, World world, int X, int Y, int Z); -} diff --git a/forge/forge_common/net/minecraft/src/forge/IGuiHandler.java b/forge/forge_common/net/minecraft/src/forge/IGuiHandler.java new file mode 100644 index 000000000..9f0bd13d3 --- /dev/null +++ b/forge/forge_common/net/minecraft/src/forge/IGuiHandler.java @@ -0,0 +1,22 @@ +package net.minecraft.src.forge; + +import net.minecraft.src.EntityPlayer; +import net.minecraft.src.World; + +public interface IGuiHandler +{ + /** + * Returns a Container to be displayed to the user. + * On the client side, this needs to return a instance of GuiScreen + * On the server side, this needs to return a instance of Container + * + * @param ID The Gui ID Number + * @param player The player viewing the Gui + * @param world The current world + * @param x X Position + * @param y Y Position + * @param z Z Position + * @return A GuiScreen/Container to be displayed to the user, null if none. + */ + public Object getGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z); +} diff --git a/forge/forge_server/src/net/minecraft/src/forge/IGuiHandler.java b/forge/forge_server/src/net/minecraft/src/forge/IGuiHandler.java deleted file mode 100644 index e13d8cb51..000000000 --- a/forge/forge_server/src/net/minecraft/src/forge/IGuiHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.minecraft.src.forge; - -import net.minecraft.src.Container; -import net.minecraft.src.EntityPlayerMP; -import net.minecraft.src.World; - -public interface IGuiHandler -{ - /** - * Returns a Container to be displayed to the user. This is server side - * - * @param ID The Gui ID Number - * @param player The player viewing the Gui - * @param world The current world - * @param X X Position - * @param Y Y Position - * @param Z Z Position - * @return A GuiScreen to be displayed to the user, null if none. - */ - public Container getGuiContainer(int ID, EntityPlayerMP player, World world, int X, int Y, int Z); -} diff --git a/forge/install/README.txt b/forge/install/README.txt index f3924dd1b..d71a4c7be 100755 --- a/forge/install/README.txt +++ b/forge/install/README.txt @@ -4,8 +4,8 @@ Extract the download archive directly into your MCP-directiory. It should create a folder "forge" within that directory, containing all extracted files. -You should use freshly downloaded jars, solely including ModLoader & -ModLoaderMP. Anything else can eventually cause conflicts. +You should use freshly downloaded jars, solely including ModLoader in the +client jar. Anything else can eventually cause conflicts. You also need to install the FernFlower decompiler, you can download it at http://goo.gl/PnJHp. Extract fernflower.jar into your MCP's runtime/bin folder. diff --git a/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch b/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch index 730d5d1f3..308c876f1 100644 --- a/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/EntityPlayer.java.patch @@ -153,7 +153,7 @@ + IGuiHandler handler = MinecraftForge.getGuiHandler(mod); + if (handler != null) + { -+ GuiScreen screen = handler.getGuiScreen(ID, (EntityPlayerSP)this, world, x, y, z); ++ GuiScreen screen = (GuiScreen)handler.getGuiElement(ID, this, world, x, y, z); + if (screen != null) + { + ModLoader.getMinecraftInstance().displayGuiScreen(screen); diff --git a/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch b/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch index 7d74391d5..78cb344c7 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/EntityPlayer.java.patch @@ -168,7 +168,7 @@ + IGuiHandler handler = MinecraftForge.getGuiHandler(mod); + if (handler != null) + { -+ Container container = handler.getGuiContainer(ID, player, world, x, y, z); ++ Container container = (Container)handler.getGuiElement(ID, player, world, x, y, z); + if (container != null) + { + player.realGetNextWidowId();