mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
58 lines
1.8 KiB
Java
58 lines
1.8 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under the
|
|
* Botania License: http://botaniamod.net/license.php
|
|
*
|
|
* File Created @ [Jan 14, 2014, 6:50:15 PM (GMT)]
|
|
*/
|
|
package vazkii.botania.common.network;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.fml.common.network.IGuiHandler;
|
|
import vazkii.botania.client.gui.bag.ContainerFlowerBag;
|
|
import vazkii.botania.client.gui.bag.GuiFlowerBag;
|
|
import vazkii.botania.client.gui.box.ContainerBaubleBox;
|
|
import vazkii.botania.client.gui.box.GuiBaubleBox;
|
|
import vazkii.botania.client.gui.crafting.ContainerCraftingHalo;
|
|
import vazkii.botania.client.gui.crafting.GuiCraftingHalo;
|
|
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
|
import vazkii.botania.common.lib.LibGuiIDs;
|
|
|
|
public class GuiHandler implements IGuiHandler {
|
|
|
|
@Override
|
|
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
|
switch(ID) {
|
|
case LibGuiIDs.CRAFTING_HALO :
|
|
return new ContainerCraftingHalo(player.inventory, world);
|
|
case LibGuiIDs.FLOWER_BAG :
|
|
return new ContainerFlowerBag(player);
|
|
case LibGuiIDs.BAUBLE_BOX :
|
|
return new ContainerBaubleBox(player);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
|
switch(ID) {
|
|
case LibGuiIDs.LEXICON :
|
|
return GuiLexicon.currentOpenLexicon;
|
|
case LibGuiIDs.CRAFTING_HALO :
|
|
return new GuiCraftingHalo(player.inventory, world);
|
|
case LibGuiIDs.FLOWER_BAG :
|
|
return new GuiFlowerBag(player);
|
|
case LibGuiIDs.BAUBLE_BOX :
|
|
return new GuiBaubleBox(player);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
}
|