Fix Gui crash on server startup

This commit is contained in:
mezz committed 2015-11-08 19:24:46 -08:00
1 parent 01433d7741
commit 56a9e84800
23 files changed
+112 -48

No files matched your search

@@ -10,9 +10,14 @@
******************************************************************************/
package forestry.farming;
import net.minecraft.client.gui.Gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.core.GuiHandlerBase;
import forestry.core.network.GuiId;
import forestry.core.network.PacketSocketUpdate;
@@ -25,7 +30,7 @@ import forestry.farming.tiles.TileFarm;
public class GuiHandlerFarming extends GuiHandlerBase {
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
public Container getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (id >= GuiId.values().length) {
return null;
@@ -42,8 +47,9 @@ public class GuiHandlerFarming extends GuiHandlerBase {
}
}
@SideOnly(Side.CLIENT)
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
public Gui getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
if (id >= GuiId.values().length) {
return null;
}