It compiles, disable JEI as it needs redoing

This commit is contained in:
modmuss50 2016-11-19 14:41:00 +00:00
parent a0e6a2dc34
commit 65e651f402
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
97 changed files with 246 additions and 1111 deletions

View file

@ -36,11 +36,11 @@ public class TileQuantumChest extends TileLegacyMachineBase
if (!world.isRemote) {
if (storedItem != null) {
ItemStack fakeStack = storedItem.copy();
fakeStack.getCount() = 1;
fakeStack.setCount(1);
setInventorySlotContents(2, fakeStack);
} else if (storedItem == null && getStackInSlot(1) != null) {
} else if (storedItem == ItemStack.EMPTY && getStackInSlot(1) != ItemStack.EMPTY) {
ItemStack fakeStack = getStackInSlot(1).copy();
fakeStack.getCount() = 1;
fakeStack.setCount(1);
setInventorySlotContents(2, fakeStack);
} else {
setInventorySlotContents(2, null);
@ -49,10 +49,10 @@ public class TileQuantumChest extends TileLegacyMachineBase
if (getStackInSlot(0) != null) {
if (storedItem == null) {
storedItem = getStackInSlot(0);
setInventorySlotContents(0, null);
setInventorySlotContents(0, ItemStack.EMPTY);
} else if (ItemUtils.isItemEqual(storedItem, getStackInSlot(0), true, true)) {
if (storedItem.getCount() <= storage - getStackInSlot(0).getCount()) {
storedItem.getCount() += getStackInSlot(0).getCount();
storedItem.grow(getStackInSlot(0).getCount());
decrStackSize(0, getStackInSlot(0).getCount());
}
}
@ -60,14 +60,14 @@ public class TileQuantumChest extends TileLegacyMachineBase
if (storedItem != null && getStackInSlot(1) == null) {
ItemStack itemStack = storedItem.copy();
itemStack.getCount() = itemStack.getMaxStackSize();
itemStack.setCount(itemStack.getMaxStackSize());
setInventorySlotContents(1, itemStack);
storedItem.getCount() -= itemStack.getMaxStackSize();
storedItem.shrink(itemStack.getMaxStackSize());
} else if (ItemUtils.isItemEqual(getStackInSlot(1), storedItem, true, true)) {
int wanted = getStackInSlot(1).getMaxStackSize() - getStackInSlot(1).getCount();
if (storedItem.getCount() >= wanted) {
decrStackSize(1, -wanted);
storedItem.getCount() -= wanted;
storedItem.shrink(wanted);
} else {
decrStackSize(1, -storedItem.getCount());
storedItem = null;
@ -94,11 +94,11 @@ public class TileQuantumChest extends TileLegacyMachineBase
storedItem = null;
if (tagCompound.hasKey("storedStack")) {
storedItem = ItemStack.loadItemStackFromNBT((NBTTagCompound) tagCompound.getTag("storedStack"));
storedItem = new ItemStack((NBTTagCompound) tagCompound.getTag("storedStack"));
}
if (storedItem != null) {
storedItem.getCount() = tagCompound.getInteger("storedQuantity");
storedItem.setCount(tagCompound.getInteger("storedQuantity"));
}
}
@ -161,15 +161,14 @@ public class TileQuantumChest extends TileLegacyMachineBase
@Override
public void setStoredItemCount(int amount) {
this.storedItem.getCount() = 0;
this.storedItem.getCount() += (amount);
storedItem.grow(amount);
this.markDirty();
}
@Override
public void setStoredItemType(ItemStack type, int amount) {
this.storedItem = type;
this.storedItem.getCount() = amount;
storedItem.setCount(amount);
this.markDirty();
}