fix items voiding under certain circumstances
This commit is contained in:
+1
-1
@@ -311,7 +311,7 @@ public final class ContainerInterfaceConfigurationTerminal extends AEBaseContain
|
||||
|
||||
if (!is.isEmpty()) {
|
||||
is.writeToNBT(itemNBT);
|
||||
if (is.getCount() > is.getMaxStackSize()) {
|
||||
if (is.getCount() > Byte.MAX_VALUE) {
|
||||
itemNBT.setInteger("stackSize", is.getCount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ public abstract class ContainerPatternEncoder extends ContainerMEMonitorable imp
|
||||
|
||||
if (!i.isEmpty()) {
|
||||
i.writeToNBT(c);
|
||||
if (i.getCount() > i.getMaxStackSize()) {
|
||||
if (i.getCount() > Byte.MAX_VALUE) {
|
||||
c.setInteger("stackSize", i.getCount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +210,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
for (final ItemStack is : this.waitingToSend) {
|
||||
final NBTTagCompound item = new NBTTagCompound();
|
||||
is.writeToNBT(item);
|
||||
if (is.getCount() > Byte.MAX_VALUE) {
|
||||
item.setInteger("stackSize", is.getCount());
|
||||
}
|
||||
waitingToSend.appendTag(item);
|
||||
}
|
||||
}
|
||||
@@ -224,6 +227,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
for (final ItemStack is : this.waitingToSendFacing.get(s)) {
|
||||
final NBTTagCompound item = new NBTTagCompound();
|
||||
is.writeToNBT(item);
|
||||
if (is.getCount() > Byte.MAX_VALUE) {
|
||||
item.setInteger("stackSize", is.getCount());
|
||||
}
|
||||
waitingListSided.appendTag(item);
|
||||
}
|
||||
sidedWaitList.setTag(s.name(), waitingListSided);
|
||||
@@ -241,6 +247,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
final NBTTagCompound c = waitingList.getCompoundTagAt(x);
|
||||
if (c != null) {
|
||||
final ItemStack is = new ItemStack(c);
|
||||
if (c.hasKey("stackSize")) {
|
||||
is.setCount(c.getInteger("stackSize"));
|
||||
}
|
||||
this.addToSendList(is);
|
||||
}
|
||||
}
|
||||
@@ -256,6 +265,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
final NBTTagCompound c = w.getCompoundTagAt(x);
|
||||
if (c != null) {
|
||||
final ItemStack is = new ItemStack(c);
|
||||
if (c.hasKey("stackSize")) {
|
||||
is.setCount(c.getInteger("stackSize"));
|
||||
}
|
||||
this.addToSendListFacing(is, EnumFacing.getFront(s.getIndex()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
|
||||
if (!is.isEmpty()) {
|
||||
NBTTagCompound itemTag = new NBTTagCompound();
|
||||
itemTag.setInteger("Slot", i);
|
||||
if (is.getCount() > is.getMaxStackSize()) {
|
||||
if (is.getCount() > Byte.MAX_VALUE) {
|
||||
itemTag.setInteger("stackSize", stacks.get(i).getCount());
|
||||
}
|
||||
stacks.get(i).writeToNBT(itemTag);
|
||||
|
||||
Reference in New Issue
Block a user