Utils ported

This commit is contained in:
Sebastian Hartte
2020-06-28 13:28:14 +02:00
parent fee5b7fdfc
commit 46955643b9
105 changed files with 239 additions and 379 deletions
@@ -144,7 +144,7 @@ public class ChestBlockEntity extends AENetworkPowerBlockEntity
}
public ItemStack getCell() {
return this.cellInventory.getStackInSlot(0);
return this.cellInventory.getInvStack(0);
}
@Override
@@ -471,7 +471,7 @@ public class ChestBlockEntity extends AENetworkPowerBlockEntity
if (this.cellHandler != null && this.cellHandler.getChannel() == AEApi.instance().storage()
.getStorageChannel(IItemStorageChannel.class)) {
final IAEItemStack returns = Platform.poweredInsert(this, this.cellHandler,
AEItemStack.fromItemStack(this.inputInventory.getStackInSlot(0)), this.mySrc);
AEItemStack.fromItemStack(this.inputInventory.getInvStack(0)), this.mySrc);
if (returns == null) {
this.inputInventory.setStackInSlot(0, ItemStack.EMPTY);
@@ -207,7 +207,7 @@ public class DriveBlockEntity extends AENetworkInvBlockEntity implements IChestO
return cellItems[slot];
}
ItemStack stackInSlot = inv.getStackInSlot(slot);
ItemStack stackInSlot = inv.getInvStack(slot);
if (!stackInSlot.isEmpty()) {
return stackInSlot.getItem();
}
@@ -336,7 +336,7 @@ public class DriveBlockEntity extends AENetworkInvBlockEntity implements IChestO
double power = 2.0;
for (int x = 0; x < this.inv.getSlots(); x++) {
final ItemStack is = this.inv.getStackInSlot(x);
final ItemStack is = this.inv.getInvStack(x);
this.invBySlot[x] = null;
this.handlersBySlot[x] = null;
@@ -262,7 +262,7 @@ public class IOPortBlockEntity extends AENetworkInvBlockEntity
try {
final IEnergySource energy = this.getProxy().getEnergy();
for (int x = 0; x < NUMBER_OF_CELL_SLOTS; x++) {
final ItemStack is = this.inputCells.getStackInSlot(x);
final ItemStack is = this.inputCells.getInvStack(x);
if (!is.isEmpty()) {
boolean shouldMove = true;
@@ -394,7 +394,7 @@ public class IOPortBlockEntity extends AENetworkInvBlockEntity
private boolean moveSlot(final int x) {
final InventoryAdaptor ad = new AdaptorFixedInv(this.outputCells);
if (ad.addItems(this.inputCells.getStackInSlot(x)).isEmpty()) {
if (ad.addItems(this.inputCells.getInvStack(x)).isEmpty()) {
this.inputCells.setStackInSlot(x, ItemStack.EMPTY);
return true;
}
@@ -438,7 +438,7 @@ public class IOPortBlockEntity extends AENetworkInvBlockEntity
super.getDrops(w, pos, drops);
for (int upgradeIndex = 0; upgradeIndex < this.upgrades.getSlots(); upgradeIndex++) {
final ItemStack stackInSlot = this.upgrades.getStackInSlot(upgradeIndex);
final ItemStack stackInSlot = this.upgrades.getInvStack(upgradeIndex);
if (!stackInSlot.isEmpty()) {
drops.add(stackInSlot);