public ContainerAmmoFurnace(InventoryPlayer playerInventory, IInventory furnaceInventory) { this.tileFurnace = furnaceInventory; for (int i = 0; i < 9; i++) this.addSlotToContainer(new Slot(furnaceInventory, i, 9 + (i % 3) * 18, 17 + (i / 3) * 18)); this.addSlotToContainer(new SlotFurnaceFuel(furnaceInventory, 9, 80, 53)); for (int i = 0; i < 9; i++) this.addSlotToContainer(new SlotFurnaceOutput(playerInventory.player, furnaceInventory, i + 10, 116 + (i % 3) * 18, 17 + (i / 3) * 18)); 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 k = 0; k < 9; ++k) this.addSlotToContainer(new Slot(playerInventory, k, 8 + k * 18, 142)); }
public ContainerLightningInfuser(InventoryPlayer player, TileEntityLightningInfuser tile) { super(player, tile); this.tileInfuser = tile; // infusion slots this.addSlotToContainer(new Slot(tile, 0, 48 + xoff, 37 + yoff_inf)); this.addSlotToContainer(new Slot(tile, 1, 48 + xoff, 17 + yoff_inf)); this.addSlotToContainer(new Slot(tile, 2, 68 + xoff, 37 + yoff_inf)); this.addSlotToContainer(new Slot(tile, 3, 48 + xoff, 57 + yoff_inf)); this.addSlotToContainer(new Slot(tile, 4, 28 + xoff, 37 + yoff_inf)); this.addSlotToContainer(new SlotFurnaceOutput(player.player, tile, 5, 125 + xoff, 32 + yoff_inf)); // player inventory placement int i; for(i = 0; i < 3; ++i) { for(int j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + yoff_inv)); } } for(i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 142 + yoff_inv)); } }
public ContainerLightningCrusher(InventoryPlayer player, TileEntityLightningCrusher tile) { super(player, tile); this.tileCrusher = tile; // furnace slots this.addSlotToContainer(new Slot(tile, 0, 56, 17)); this.addSlotToContainer(new SlotFurnaceOutput(player.player, tile, 1, 116, 35)); // player inventory placement int i; for(i = 0; i < 3; ++i) { for(int j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for(i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 142)); } }
public ContainerLightningFurnace(InventoryPlayer player, TileEntityLightningFurnace tile) { super(player, tile); this.tileFurnace = tile; // furnace slots this.addSlotToContainer(new Slot(tile, 0, 56, 17)); this.addSlotToContainer(new SlotFurnaceOutput(player.player, tile, 1, 116, 35)); // player inventory placement int i; for(i = 0; i < 3; ++i) { for(int j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for(i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 142)); } }
private void registerSlots(InventoryPlayer inventory, TileEntityRelicLab tileEntityRelicLab) { this.addSlotToContainer(new Slot(tileEntityRelicLab, 0, 56, 35)); this.addSlotToContainer(new Slot(tileEntityRelicLab, 1, 22, 35)); this.addSlotToContainer(new SlotFurnaceOutput(inventory.player, tileEntityRelicLab, 2, 116, 35)); for(int i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventory, j + i*9 + 9, 8 + j*18, 84 + i*18)); } } for(int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventory, i, 8 + i*18, 142)); } }
public ContainerAlloyFurnace(InventoryPlayer p_i45794_1_, IInventory furnaceInventory) { this.tileFurnace = furnaceInventory; this.addSlotToContainer(new Slot(furnaceInventory, 0, 35, 17)); this.addSlotToContainer(new Slot(furnaceInventory, 1, 53, 17)); this.addSlotToContainer(new SlotFurnaceFuel(furnaceInventory, 2, 44, 53)); this.addSlotToContainer(new SlotFurnaceOutput(p_i45794_1_.player, furnaceInventory, 3, 116, 35)); int i; for (i = 0; i < 3; ++i) { for (int j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(p_i45794_1_, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for (i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(p_i45794_1_, i, 8 + i * 18, 142)); } }
private void addSlots() { this.addSlotToContainer(new Slot(tileFurnace, 0, 56, 17)); this.addSlotToContainer(new SlotFurnaceFuel(tileFurnace, 1, 56, 53)); this.addSlotToContainer(new SlotFurnaceOutput(playerInventory.player, tileFurnace, 2, 116, 35)); // Adds the player inventory to furnace's gui. for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(playerInventory, x + y * 9 + 9, 8 + x * 18, 84 + y * 18)); } } // Adds the player hotbar slots to the gui. for (int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(playerInventory, i, 8 + i * 18, 142)); // 198 } }
/** * Adds all slots, player and container. * * @param inv inventory. * @param te tile entity object. */ protected void addSlots(InventoryPlayer inv, AbstractTileEntityMachine te) { // Add 'crafting' slots to container. if (this.NUM_SLOTS - te.getSizeUpgradeSlots() == 1) this.addSlotToContainer(new Slot(te, 0, 79, 21)); else if (this.NUM_SLOTS - te.getSizeUpgradeSlots() == 2) { this.addSlotToContainer(new Slot(te, 0, 41, 21)); this.addSlotToContainer(new SlotFurnaceOutput(inv.player, te, 1, 121, 21)); } else if (this.NUM_SLOTS - te.getSizeUpgradeSlots() == 3) { this.addSlotToContainer(new Slot(te, 0, 30, 21)); this.addSlotToContainer(new Slot(te, 2, 55, 21)); this.addSlotToContainer(new SlotFurnaceOutput(inv.player, te, 1, 121, 21)); } addUpgradeInventorySlots(te); addPlayerInventorySlots(inv); }
/** * Adds all slots, player and container. * @param inv = inventory. * @param te = tile entity object. */ private void addSlots(InventoryPlayer inv, TileEntityNuclearIOPort te) { if (this.NUM_SLOTS == 2) { this.addSlotToContainer(new Slot(te, 0, 41, 21)); this.addSlotToContainer(new SlotFurnaceOutput(inv.player, te, 1, 121, 21)); } // Adds the player inventory to furnace's gui. for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(inv, (x + y * 9) + 9, 8 + x * 18, 84 + y * 18)); } } // Adds the player hotbar slots to the gui. for (int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 142)); // 198 } }
public ContainerFurnace(InventoryPlayer inventory, IInventory te) { this.furnace = te; this.addSlotToContainer(new Slot(te, 0, 56, 17)); this.addSlotToContainer(new SlotFurnaceFuel(te, 1, 56, 53)); this.addSlotToContainer(new SlotFurnaceOutput(inventory.player, te, 2, 116, 35)); int i; for(i = 0; i < 3; i++) { for(int j = 0; j < 9; j++) { this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for(i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142)); } }
@Override public void initSlots(TileBlastFurnace tile, ContainerMachine<TileBlastFurnace> container, EntityPlayer player) { container.addSlot(new Slot(tile.inventory, TileBlastFurnace.INPUT1, 61, 11)); container.addSlot(new Slot(tile.inventory, TileBlastFurnace.INPUT2, 81, 11)); container.addSlot(new Slot(tile.inventory, TileBlastFurnace.INPUT3, 101, 11)); container.addSlot(new SlotFurnaceOutput(player, tile.inventory, TileBlastFurnace.OUTPUT1, 71, 57)); container.addSlot(new SlotFurnaceOutput(player, tile.inventory, TileBlastFurnace.OUTPUT2, 91, 57)); }
public ContainerDNAMachine(EntityPlayer player, TileEntityDNAMachine tileEntity) { this.addPlayerInventory(player.inventory); this.tileMachine = tileEntity; //Sample this.addSlotToContainer(new Slot(tileMachine, 0, 80, 11)); //Empty Syringe this.addSlotToContainer(new Slot(tileMachine, 1, 53, 38)); //Output this.addSlotToContainer(new SlotFurnaceOutput(player, tileMachine, 2, 107, 38)); }
public ContainerGrinder(EntityPlayer player, TileEntityGrinder tileEntity) { this.addPlayerInventory(player.inventory); this.tileMachine = (tileEntity); this.addSlotToContainer(new Slot(tileMachine, 0, 56, 35)); this.addSlotToContainer(new SlotFurnaceOutput(player, tileMachine, 1, 116, 35)); this.addSlotToContainer(new SlotFurnaceOutput(player, tileMachine, 2, 142, 35)); }
public ContainerCrystalFurnace(EntityPlayer player, TileEntityCrystalFurnace tileEntity) { this.addPlayerInventory(player.inventory); this.tileFurnace = (tileEntity); this.addSlotToContainer(new Slot(tileFurnace, 0, 56, 26)); this.addSlotToContainer(new SlotFurnaceOutput(player, tileFurnace, 1, 116, 35)); }
public ContainerCrystalInfuser(EntityPlayer player, TileEntityCrystalInfuser tileEntity) { this.addPlayerInventory(player.inventory); this.tileMachine = (tileEntity); this.addSlotToContainer(new Slot(tileMachine, 0, 132, 34)); this.addSlotToContainer(new SlotFurnaceOutput(player, tileMachine, 1, 80, 34)); }
public ContainerPress(EntityPlayer player, TileEntityPress tileEntity) { this.addPlayerInventory(player.inventory); this.tileMachine = tileEntity; this.addSlotToContainer(new Slot(tileMachine, 0, 56, 35)); this.addSlotToContainer(new SlotFurnaceOutput(player, tileMachine, 1, 116, 35)); }
public ContainerSteamFurnace(InventoryPlayer playerInv, TileEntitySteamFurnace te) { this.te = te; addSlotToContainer(new Slot(te, 0, 44, 35)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, te, 1, 130, 36)); // addSlotToContainer(new SlotOutput(te, 2, 148, 36)); // addSlotToContainer(new SlotSpeedUpgrade(te, 2, 152, 63, 24)); addPlayerSlots(playerInv, 8, 84); }
public ContainerAdvSteamFurnace(InventoryPlayer playerInv, TileEntitySteamFurnaceAdv te) { this.te = te; addSlotToContainer(new Slot(te, 0, 44, 35)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, te, 1, 130, 36)); // addSlotToContainer(new SlotSpeedUpgrade(te, 2, 152, 63, 24)); addPlayerSlots(playerInv, 8, 84); }
public ContainerElectricFurnace(InventoryPlayer playerInv, TileEntityElectricFurnace te) { this.te = te; addSlotToContainer(new Slot(te, 0, 44, 35)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, te, 1, 130, 36)); addSlotToContainer(new SlotSpeedUpgrade(te, 2, 152, 63, 24)); addPlayerSlots(playerInv, 8, 84); }
public ContainerAdvElectricFurnace(InventoryPlayer playerInv, TileEntityElectricFurnaceAdv te) { this.te = te; addSlotToContainer(new Slot(te, 0, 44, 35)); addSlotToContainer(new SlotFurnaceOutput(playerInv.player, te, 1, 130, 36)); addSlotToContainer(new SlotSpeedUpgrade(te, 2, 152, 63, 24)); addPlayerSlots(playerInv, 8, 84); }
@Override public ItemStack transferStackInSlot(EntityPlayer p, int i) { ItemStack itemstack = null; Slot slot = this.inventorySlots.get(i); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); int playerInv = 30; if (i < this.tile.getSizeInventory() + playerInv) { if(!(slot instanceof SlotFurnaceOutput)) { if (!this.mergeItemStack(itemstack1, this.tile.getSizeInventory() + playerInv, this.inventorySlots.size(), true)) { return null; } } } else if (!this.mergeItemStack(itemstack1, 0, this.tile.getSizeInventory() + playerInv, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack(null); } else { slot.onSlotChanged(); } } return itemstack; }
/** * Method to add slots to this container. * * @param inv player's inventory to reference. * @param te te to reference. */ protected void addSlots(InventoryPlayer inv, AbstractTileEntityDigger te) { if (this.NUM_SLOTS - te.getSizeUpgradeSlots() > 0) { for (int y = 0; y < 2; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new SlotFurnaceOutput(inv.player, te, x + y * 9, 8 + x * 18, 1 + 53 + y * 18)); } } } // add upgrade slots last! for (int i = 0; i < te.getSizeUpgradeSlots(); i++) { this.addSlotToContainer(new SlotUpgrade(te, this.NUM_SLOTS - te.getSizeUpgradeSlots() + i, 176 + 8, 8 + i * 18)); } // Adds the player inventory to furnace's gui. for (int y = 0; y < 3; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new Slot(inv, (x + y * 9) + 9, 8 + x * 18, 32 + 84 + y * 18)); } } // Adds the player hotbar slots to the gui. for (int i = 0; i < 9; i++) { this.addSlotToContainer(new Slot(inv, i, 8 + i * 18, 32 + 142)); // 198 } }
@Override protected void addSlots(InventoryPlayer inv, AbstractTileEntityMachine te) { // TODO: Add and implement filtering slots! // Adds the 2 row, 9 col inventory box. for (int y = 0; y < 2; y++) { for (int x = 0; x < 9; x++) { this.addSlotToContainer(new SlotFurnaceOutput(inv.player, te, x + y * 9, 8 + x * 18, 17 + 53 + y * 18)); } } addUpgradeInventorySlots(te); addPlayerInventorySlots(inv); }
@Override public void initSlots(TileCrusher tile, ContainerMachine<TileCrusher> container, EntityPlayer player) { container.addSlot(new Slot(tile.inv, 0, 90, 6)); container.addSlot(new SlotFurnaceOutput(player, tile.inv, 1, 80, 52)); container.addSlot(new SlotFurnaceOutput(player, tile.inv, 2, 100, 52)); }
@Override public void initSlots(TileDuster tile, ContainerMachine<TileDuster> container, EntityPlayer player) { container.addSlot(new Slot(tile.inventory, TileDuster.INPUT1, 71, 11)); container.addSlot(new Slot(tile.inventory, TileDuster.INPUT2, 91, 11)); container.addSlot(new SlotFurnaceOutput(player, tile.inventory, TileDuster.OUTPUT, 81, 57)); }
private void createSlots(TileEntityMachineHeatedOven tile, EntityPlayer player) { addSlotToContainer(new Slot(tile, 0, 52, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 1, 129, 34)); }
private void createSlots(TileEntityMachineLumberMill tile, EntityPlayer player) { addSlotToContainer(new Slot(tile, 0, 52, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 1, 129, 34)); }
private void createSlots(TileEntityMachineMetalMixer tile, EntityPlayer player) { addSlotToContainer(new Slot(tile, 0, 39, 16)); addSlotToContainer(new Slot(tile, 1, 62, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 2, 121, 34)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 3, 138, 34)); }
private void createSlots(TileEntityMachineOreTumbler tile, EntityPlayer player) { addSlotToContainer(new Slot(tile, 0, 52, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 1, 129, 34)); }
private void createSlots(TileEntityMachineFlowstoneBottler tile, EntityPlayer player) { addSlotToContainer(new SlotCharging(tile, 0, 52, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 1, 129, 34)); }
private void createSlots(TileEntityMachineWorkbench tile, EntityPlayer player) { addSlotToContainer(new Slot(tile, 0, 29, 16)); addSlotToContainer(new Slot(tile, 1, 52, 16)); addSlotToContainer(new Slot(tile, 2, 75, 16)); addSlotToContainer(new SlotFurnaceOutput(player, tile, 3, 129, 34)); }