Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Mrhand3.SOARYN.Gui;
- import net.minecraft.client.multiplayer.WorldClient;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- import Mrhand3.SOARYN.common.BaseMod;
- import Mrhand3.SOARYN.mob.EntitySoarynChest;
- import cpw.mods.fml.common.network.IGuiHandler;
- public class GuiHandler implements IGuiHandler
- {
- @Override
- public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
- {
- if (id != -1)
- {
- int guiId = BaseMod.guiSoarynChestID;
- if (guiId == BaseMod.guiSoarynChestID)
- {
- return new ContainerFossilizer(player.inventory, (EntitySoarynChest)world.getEntityByID(x));
- }
- }
- else
- {
- return false;
- }
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
- {
- if ((world instanceof WorldClient))
- {
- if (ID == BaseMod.guiSoarynChestID)
- {
- return new GuiFossilizer(new ContainerFossilizer(player.inventory, (EntitySoarynChest)world.getEntityByID(x)));
- }
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment