fix interface dropping stacks over the stack limit. fix potential dupes
fixes #328
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ modId=appliedenergistics2
|
|||||||
modGroup=appeng
|
modGroup=appeng
|
||||||
# Version of your mod.
|
# Version of your mod.
|
||||||
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
|
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
|
||||||
modVersion=rv6-stable-7-extended_life-v0.55.26
|
modVersion=rv6-stable-7-extended_life-v0.55.29
|
||||||
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
|
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
|
||||||
includeMCVersionJar=false
|
includeMCVersionJar=false
|
||||||
# The name of your jar when you produce builds, not including any versioning info
|
# The name of your jar when you produce builds, not including any versioning info
|
||||||
|
|||||||
@@ -1203,6 +1203,13 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
|
|
||||||
for (final ItemStack is : this.storage) {
|
for (final ItemStack is : this.storage) {
|
||||||
if (!is.isEmpty()) {
|
if (!is.isEmpty()) {
|
||||||
|
int maxStackSize = is.getMaxStackSize();
|
||||||
|
while (is.getCount() > maxStackSize) {
|
||||||
|
ItemStack portionedStack = is.copy();
|
||||||
|
portionedStack.setCount(maxStackSize);
|
||||||
|
is.shrink(maxStackSize);
|
||||||
|
drops.add(portionedStack);
|
||||||
|
}
|
||||||
drops.add(is);
|
drops.add(is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user