Guest User

Untitled

a guest
Jan 10th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.15 KB | None | 0 0
  1. package us.xvicario.rpglevel;
  2.  
  3. import us.xvicario.rpglevel.gui.LevelUpStationContainer;
  4. import us.xvicario.rpglevel.gui.LevelUpStationGUI;
  5. import net.minecraft.entity.player.EntityPlayer;
  6. import net.minecraft.tileentity.TileEntity;
  7. import net.minecraft.world.World;
  8. import cpw.mods.fml.common.network.IGuiHandler;
  9.  
  10. public class LevelUpGUIHandler implements IGuiHandler {
  11.  
  12.     @Override
  13.     public Object getClientGuiElement(int ID, EntityPlayer player, World world,
  14.             int x, int y, int z) {
  15.         TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  16.         if(tileEntity instanceof TileEntityLevelUpStation){
  17.                 return new LevelUpStationGUI(player, player.inventory, (TileEntityLevelUpStation) tileEntity);
  18.         }
  19.         return null;
  20.     }
  21.  
  22.     @Override
  23.     public Object getServerGuiElement(int ID, EntityPlayer player, World world,
  24.             int x, int y, int z) {
  25.         TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  26.         if(tileEntity instanceof TileEntityLevelUpStation){
  27.                 return new LevelUpStationContainer(player.inventory, (TileEntityLevelUpStation) tileEntity);
  28.         }
  29.         return null;
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment