2013-05-23 21:07:28 -07:00
|
|
|
package magicbees.client.gui;
|
2013-04-21 15:38:52 -07:00
|
|
|
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.tileentity.TileEntityEffectJar;
|
2015-01-16 22:06:02 +01:00
|
|
|
import magicbees.tileentity.TileEntityThaumicApiary;
|
2013-04-21 15:38:52 -07:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
2015-01-16 22:06:02 +01:00
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2013-04-21 15:38:52 -07:00
|
|
|
import net.minecraft.world.World;
|
2015-01-16 22:06:02 +01:00
|
|
|
import cpw.mods.fml.common.network.IGuiHandler;
|
2013-04-21 15:38:52 -07:00
|
|
|
|
|
|
|
|
public class GUIHandler implements IGuiHandler
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
|
|
|
|
{
|
|
|
|
|
Object value = null;
|
2015-01-16 22:06:02 +01:00
|
|
|
|
2013-04-21 15:38:52 -07:00
|
|
|
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
|
|
|
|
{
|
2014-04-08 12:39:01 -07:00
|
|
|
value = new ContainerEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
|
2013-04-21 15:38:52 -07:00
|
|
|
}
|
2015-01-16 22:06:02 +01:00
|
|
|
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
|
|
|
|
{
|
|
|
|
|
TileEntityThaumicApiary tileEntityThaumicApiary = (TileEntityThaumicApiary) world.getTileEntity(x, y, z);
|
|
|
|
|
value = new ContainerThaumicApiary(player.inventory, tileEntityThaumicApiary);
|
|
|
|
|
}
|
2013-04-21 15:38:52 -07:00
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
|
|
|
|
{
|
|
|
|
|
Object value = null;
|
|
|
|
|
|
|
|
|
|
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
|
|
|
|
{
|
2014-04-08 12:39:01 -07:00
|
|
|
value = new GUIEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
|
2015-01-16 22:06:02 +01:00
|
|
|
}else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
|
|
|
|
{
|
|
|
|
|
TileEntityThaumicApiary tileEntityThaumicApiary = (TileEntityThaumicApiary) world.getTileEntity(x, y, z);
|
|
|
|
|
value = new GuiThaumicApiary(player.inventory, tileEntityThaumicApiary);
|
|
|
|
|
}
|
2013-04-21 15:38:52 -07:00
|
|
|
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|