Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: smbarbour on May 5th, 2012  |  syntax: None  |  size: 1.87 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * BuildCraft is open-source. It is distributed under the terms of the
  3.  * BuildCraft Open Source License. It grants rights to read, modify, compile
  4.  * or run the code. It does *NOT* grant the right to redistribute this software
  5.  * or its modifications in any form, binary or source, except if expressively
  6.  * granted by the copyright holder.
  7.  */
  8.  
  9. package buildcraft.additionalpipes.gui;
  10.  
  11. import net.minecraft.server.EntityHuman;
  12. import net.minecraft.server.EntityPlayer;
  13. import net.minecraft.server.IInventory;
  14. import net.minecraft.server.Slot;
  15. import buildcraft.core.BuildCraftContainer;
  16.  
  17. public class CraftingAdvancedWoodPipe extends BuildCraftContainer {
  18.  
  19.     IInventory playerIInventory;
  20.     IInventory filterIInventory;
  21.  
  22.     public CraftingAdvancedWoodPipe (IInventory playerInventory, IInventory filterInventory) {
  23.         super (filterInventory.getSize());
  24.         this.playerIInventory = playerInventory;
  25.         this.filterIInventory = filterInventory;
  26.  
  27.         int k = 0;
  28.  
  29.         for(int j1 = 0; j1 < 9; j1++) {
  30.             a(new Slot(filterInventory, j1 + k * 9, 8 + j1 * 18, 18 + k * 18));
  31.         }
  32.  
  33.  
  34.         for(int l = 0; l < 3; l++) {
  35.             for(int k1 = 0; k1 < 9; k1++) {
  36.                 a(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 76 + l * 18));
  37.             }
  38.  
  39.         }
  40.  
  41.         for(int i1 = 0; i1 < 9; i1++) {
  42.             a(new Slot(playerInventory, i1, 8 + i1 * 18, 134));
  43.         }
  44.     }
  45.  
  46.     @Override
  47.     public boolean b(EntityHuman entityplayer) {
  48.         // TODO Auto-generated method stub
  49.         return true;
  50.     }
  51.  
  52.     public EntityHuman getPlayer() {
  53.         if (playerIInventory.getOwner() instanceof EntityHuman) {
  54.                 return (EntityHuman) playerIInventory.getOwner();
  55.         } else {
  56.                 return null;
  57.         }
  58.     }
  59.      
  60.     public IInventory getInventory() {
  61.         return filterIInventory;
  62.     }
  63. }