Guest User

Container

a guest
Jan 23rd, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 KB | None | 0 0
  1. package destinyspork.sporksstuff.container;
  2.  
  3. import [..]
  4.  
  5. /**This is just _BedrockMiners_ code **/
  6.  
  7. public class ContainerFeeder extends Container {
  8.    
  9.     private TileEntityFeeder te;
  10.    
  11.     public ContainerFeeder(IInventory playerInv, TileEntityFeeder te) {
  12.         this.te = te;
  13.        
  14.         for (int y = 0; y < 3; ++y) {
  15.             for (int x = 0; x < 3; ++x) {
  16.                 this.addSlotToContainer(new Slot(te, x + y * 3, 62 + x * 18, 17 + y * 18));
  17.             }
  18.         }
  19.         for (int y = 0; y < 3; ++y) {
  20.             for (int x = 0; x < 9; ++x) {
  21.                 this.addSlotToContainer(new Slot(playerInv, x + y * 9 + 9, 8 + x * 18, 84 + y * 18));
  22.             }
  23.         }
  24.         for (int x = 0; x < 9; ++x) {
  25.             this.addSlotToContainer(new Slot(playerInv, x, 8 + x * 18, 142));
  26.         }
  27.     }
  28.  
  29.     @Override
  30.     public boolean canInteractWith(EntityPlayer playerIn) {
  31.         return this.te.isUseableByPlayer(playerIn);
  32.     }
  33.    
  34. }
Advertisement
Add Comment
Please, Sign In to add comment