Advertisement
drinfernoo

TinyHandler.java

Sep 5th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package net.minecraft.src;
  2.  
  3. import cpw.mods.fml.common.network.IGuiHandler;
  4.  
  5. public class TinyHandler implements IGuiHandler {
  6.  
  7.     @Override
  8.     public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
  9.         TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  10.         if (tileEntity instanceof TileEntityTiny) {
  11.             return new ContainerTiny((TileEntityTiny) tileEntity, player.inventory);
  12.         }
  13.        
  14.         return null;
  15.     }
  16.  
  17.     @Override
  18.     public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
  19.         TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  20.         if (tileEntity instanceof TileEntityTiny) {
  21.             return new GuiTiny(player.inventory, (TileEntityTiny) tileEntity);
  22.         }
  23.        
  24.         return null;
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement