Fixed duplication bug in the Interface. Fixes #3414
This was a problem with returning the remainder if there are valid storages, but they are all in extract-only (the #insert call never propagates to IStorage in that case). If stack.size differs from size, the stack with its wrong size is returned literally as remainder in that case, which breaks an assumption in the interface.
This commit is contained in:
@@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed duplication bug in the Interface.
|
||||||
|
|
||||||
## [v1.11.3] - 2022-12-20
|
## [v1.11.3] - 2022-12-20
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@@ -273,7 +273,7 @@ public class Network implements INetwork, IRedstoneConfigurable {
|
|||||||
return ItemHandlerHelper.copyStackWithSize(stack, size);
|
return ItemHandlerHelper.copyStackWithSize(stack, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack remainder = stack;
|
ItemStack remainder = ItemHandlerHelper.copyStackWithSize(stack, size);
|
||||||
|
|
||||||
int inserted = 0;
|
int inserted = 0;
|
||||||
int insertedExternally = 0;
|
int insertedExternally = 0;
|
||||||
@@ -380,7 +380,7 @@ public class Network implements INetwork, IRedstoneConfigurable {
|
|||||||
return StackUtils.copy(stack, size);
|
return StackUtils.copy(stack, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
FluidStack remainder = stack;
|
FluidStack remainder = StackUtils.copy(stack, size);
|
||||||
|
|
||||||
int inserted = 0;
|
int inserted = 0;
|
||||||
int insertedExternally = 0;
|
int insertedExternally = 0;
|
||||||
|
Reference in New Issue
Block a user