2018-09-13 12:03:28 -04:00
|
|
|
package noppes.npcs.containers;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
|
import net.minecraft.inventory.Container;
|
|
|
|
|
import net.minecraft.inventory.Slot;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
2022-05-24 01:07:50 -05:00
|
|
|
import noppes.npcs.controllers.data.Bank;
|
2018-09-13 12:03:28 -04:00
|
|
|
|
2025-03-12 20:12:01 -04:00
|
|
|
public class ContainerManageBanks extends Container {
|
|
|
|
|
public Bank bank;
|
|
|
|
|
|
|
|
|
|
public ContainerManageBanks(EntityPlayer player) {
|
|
|
|
|
bank = new Bank();
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
|
int x = 36;
|
|
|
|
|
int y = 38;
|
|
|
|
|
y += i * 22;
|
|
|
|
|
addSlotToContainer(new Slot(bank.currencyInventory, i, x, y));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
|
int x = 142;
|
|
|
|
|
int y = 38;
|
|
|
|
|
y += i * 22;
|
|
|
|
|
addSlotToContainer(new Slot(bank.upgradeInventory, i, x, y));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (int j1 = 0; j1 < 9; j1++) {
|
|
|
|
|
addSlotToContainer(new Slot(player.inventory, j1, 8 + j1 * 18, 171));
|
2018-09-13 12:03:28 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2025-03-12 20:12:01 -04:00
|
|
|
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int i) {
|
2018-09-13 12:03:28 -04:00
|
|
|
return null;
|
|
|
|
|
}
|
2025-03-12 20:12:01 -04:00
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean canInteractWith(EntityPlayer entityplayer) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setBank(Bank bank2) {
|
|
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
|
|
bank.currencyInventory.setInventorySlotContents(i, bank2.currencyInventory.getStackInSlot(i));
|
|
|
|
|
bank.upgradeInventory.setInventorySlotContents(i, bank2.upgradeInventory.getStackInSlot(i));
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-09-13 12:03:28 -04:00
|
|
|
}
|
|
|
|
|
|