Guest User

CulinaryGuiHandler

a guest
Sep 21st, 2012
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package KBI.agricrafture.core;
  2.  
  3. import net.minecraft.src.*;
  4. import KBI.agricrafture.api.*;
  5. import cpw.mods.fml.common.network.IGuiHandler;
  6. import java.util.logging.Level;
  7. import cpw.mods.fml.common.FMLLog;
  8.  
  9. public class CulinaryGuiHandler implements IGuiHandler
  10. {
  11.  
  12.         @Override
  13.         public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
  14.         {
  15.                 FMLLog.log(Level.FINE, "Agricrafture getting Server GUI element");
  16.                 TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  17.                 if(tileEntity instanceof TileEntityCulinary)
  18.                 {
  19.                         FMLLog.log(Level.FINE, "Returning new ContainerCulinary...");
  20.                         return new ContainerCulinary(player.inventory, (TileEntityCulinary) tileEntity);
  21.                 }
  22.                 return null;
  23.         }
  24.  
  25.         @Override
  26.         public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
  27.         {
  28.                 FMLLog.log(Level.FINE, "Agricrafture getting Client GUI element");
  29.                 TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
  30.                 if(tileEntity instanceof TileEntityCulinary)
  31.                 {
  32.                         FMLLog.log(Level.FINE, "Returning new GuiCulinary...");
  33.                         return new GuiCulinary(player.inventory, (TileEntityCulinary) tileEntity);
  34.                 }
  35.                 return null;
  36.         }
  37. }
RAW Paste Data