blob: 951b697aab5bd03f08b74f5422b5d21397a83b95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package miscutil.core.handler;
import miscutil.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class GuiHandler implements IGuiHandler {
private static final int GUI1 = 0; //Nothing Yet
private static final int GUI2 = 1; //Energy Buffer
@Override //ContainerModTileEntity
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if (ID == GUI1){}
//return new GUI_Battery_Buffer();
return null;
}
@Override //GuiModTileEntity
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
Utils.LOG_WARNING("getClientGuiElement Called by: "+player+", in world: "+player.dimension+" at x:"+x+", y:"+y+", z:"+z+".");
if (ID == GUI1){
Utils.LOG_WARNING("Opening Gui with Id: "+ID);
//return new GUI_Battery_Buffer();
}
else if (ID == GUI2){
Utils.LOG_WARNING("Opening Gui with Id: "+ID+" Energy Buffer");
//return new GUI_Bat_Buf();
}
return null;
}
}
|