2015-01-30 20:16:32 +01:00
|
|
|
package ellpeck.someprettyrandomstuff.inventory;
|
2014-12-18 19:24:06 +01:00
|
|
|
|
2015-02-09 17:25:05 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.SPRS;
|
2015-01-30 20:16:32 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
2015-02-09 17:25:05 +01:00
|
|
|
import ellpeck.someprettyrandomstuff.util.Util;
|
2014-12-18 19:24:06 +01:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-02-09 17:25:05 +01:00
|
|
|
import net.minecraft.util.BlockPos;
|
2014-12-18 19:24:06 +01:00
|
|
|
import net.minecraft.world.World;
|
2015-02-09 17:25:05 +01:00
|
|
|
import net.minecraftforge.fml.common.network.IGuiHandler;
|
|
|
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
2014-12-18 19:24:06 +01:00
|
|
|
|
2015-02-09 17:25:05 +01:00
|
|
|
public class GuiHandler implements IGuiHandler{
|
2014-12-18 19:24:06 +01:00
|
|
|
|
|
|
|
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z) {
|
2015-02-09 17:25:05 +01:00
|
|
|
TileEntityBase tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
|
2014-12-18 19:24:06 +01:00
|
|
|
switch (id) {
|
|
|
|
default:
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z) {
|
2015-02-09 17:25:05 +01:00
|
|
|
TileEntityBase tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
|
2014-12-18 19:24:06 +01:00
|
|
|
switch (id) {
|
|
|
|
default:
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void init(){
|
2015-02-09 17:25:05 +01:00
|
|
|
Util.logInfo("Initializing GuiHandler...");
|
|
|
|
NetworkRegistry.INSTANCE.registerGuiHandler(SPRS.instance, new GuiHandler());
|
2014-12-18 19:24:06 +01:00
|
|
|
}
|
|
|
|
}
|