Advertisement
Guest User

Untitled

a guest
Jun 13th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.57 KB | None | 0 0
  1. package com.thepsionic.ingens.inventory;
  2.  
  3. import net.minecraft.entity.player.EntityPlayer;
  4. import net.minecraft.entity.player.InventoryPlayer;
  5. import net.minecraft.inventory.*;
  6. import net.minecraft.util.BlockPos;
  7. import net.minecraft.world.World;
  8.  
  9. public class ContainerUpgrader extends Container {
  10.     public InventoryUpgrader craftArea = new InventoryUpgrader(this);
  11.     public IInventory result = new InventoryCraftResult();
  12.     private World world;
  13.     private BlockPos blockPosition;
  14.  
  15.     public ContainerUpgrader(InventoryPlayer playerInventory, World worldIn, BlockPos pos) {
  16.         this.world = worldIn;
  17.         this.blockPosition = pos;
  18.         this.addSlotToContainer(new SlotUpgrading(playerInventory.player, this.craftArea, this.result, 0, 124, 35));
  19.  
  20.         this.addSlotToContainer(new Slot(this.craftArea, 0, 48, 35));
  21.         this.addSlotToContainer(new Slot(this.craftArea, 1, 74, 35));
  22.  
  23.         for (int i = 0; i < 3; ++i)
  24.         {
  25.             for (int j = 0; j < 9; ++j)
  26.             {
  27.                 this.addSlotToContainer(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
  28.             }
  29.         }
  30.  
  31.         for (int i = 0; i < 9; ++i)
  32.         {
  33.             this.addSlotToContainer(new Slot(playerInventory, i, 8 + i * 18, 142));
  34.         }
  35.  
  36.         this.onCraftMatrixChanged(this.craftArea);
  37.     }
  38.  
  39.     @Override
  40.     public boolean canInteractWith(EntityPlayer playerIn) {
  41.         return true;
  42.     }
  43.  
  44.     @Override
  45.     public void onCraftMatrixChanged(IInventory inventoryIn)
  46.     {
  47.         //TODO implement recipes
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement