This commit is contained in:
kuba6000 committed 2022-10-12 21:09:45 +02:00
1 parent d993c90c3e
commit 14a712260b
156 files changed
+14896 -13422

No files matched your search

@@ -1,46 +1,36 @@
package magicbees.client.gui;
import cpw.mods.fml.common.network.IGuiHandler;
import magicbees.tileentity.TileEntityEffectJar;
import magicbees.tileentity.TileEntityMagicApiary;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class GUIHandler implements IGuiHandler
{
public class GUIHandler implements IGuiHandler {
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
Object value = null;
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
Object value = null;
if (ID == UIScreens.EFFECT_JAR.ordinal())
{
value = new ContainerEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
}
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
{
if (ID == UIScreens.EFFECT_JAR.ordinal()) {
value = new ContainerEffectJar((TileEntityEffectJar) world.getTileEntity(x, y, z), player);
} else if (ID == UIScreens.THAUMIC_APIARY.ordinal()) {
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
value = new ContainerMagicApiary(player.inventory, tileEntityThaumicApiary);
}
return value;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
if (ID == UIScreens.EFFECT_JAR.ordinal())
{
return new GUIEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
}else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
{
return value;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
if (ID == UIScreens.EFFECT_JAR.ordinal()) {
return new GUIEffectJar((TileEntityEffectJar) world.getTileEntity(x, y, z), player);
} else if (ID == UIScreens.THAUMIC_APIARY.ordinal()) {
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
return new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
return new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
} else {
return null;
}
}
return null;
}
}
}