Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.thepsionic.ingens.inventory;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.*;
- import net.minecraft.util.BlockPos;
- import net.minecraft.world.World;
- public class ContainerUpgrader extends Container {
- public InventoryUpgrader craftArea = new InventoryUpgrader(this);
- public IInventory result = new InventoryCraftResult();
- private World world;
- private BlockPos blockPosition;
- public ContainerUpgrader(InventoryPlayer playerInventory, World worldIn, BlockPos pos) {
- this.world = worldIn;
- this.blockPosition = pos;
- this.addSlotToContainer(new SlotUpgrading(playerInventory.player, this.craftArea, this.result, 0, 124, 35));
- this.addSlotToContainer(new Slot(this.craftArea, 0, 48, 35));
- this.addSlotToContainer(new Slot(this.craftArea, 1, 74, 35));
- for (int i = 0; i < 3; ++i)
- {
- for (int j = 0; j < 9; ++j)
- {
- this.addSlotToContainer(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
- for (int i = 0; i < 9; ++i)
- {
- this.addSlotToContainer(new Slot(playerInventory, i, 8 + i * 18, 142));
- }
- this.onCraftMatrixChanged(this.craftArea);
- }
- @Override
- public boolean canInteractWith(EntityPlayer playerIn) {
- return true;
- }
- @Override
- public void onCraftMatrixChanged(IInventory inventoryIn)
- {
- //TODO implement recipes
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement