mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-17 02:45:08 +00:00
fix drops leak to item cell when discretizer go offline
This commit is contained in:
1 parent
2b94b20e2e
commit
e8825d74e7
5 files changed
+131
-20
No files matched your search
@@ -129,25 +129,6 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost
|
||||
updateState();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void onBootUp(MENetworkBootingStatusChange event) {
|
||||
try {
|
||||
IMEInventory<IAEItemStack> inventory = this.getProxy().getStorage().getItemInventory();
|
||||
IItemList<IAEItemStack> items = inventory.getAvailableItems(AEApi.instance().storage().createItemList());
|
||||
IItemList<IAEItemStack> drops = AEApi.instance().storage().createItemList();
|
||||
for (IAEItemStack item : items) {
|
||||
if (item != null && item.getItem() instanceof ItemFluidDrop) {
|
||||
drops.add(item);
|
||||
}
|
||||
}
|
||||
for (IAEItemStack drop : drops) {
|
||||
inventory.extractItems(drop, Actionable.MODULATE, ownActionSource);
|
||||
inventory.injectItems(drop, Actionable.MODULATE, ownActionSource);
|
||||
}
|
||||
} catch (GridAccessException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
private class FluidDiscretizingInventory implements IMEInventory<IAEItemStack>, IMEMonitorHandlerReceiver<IAEFluidStack> {
|
||||
|
||||
private final MEInventoryHandler<IAEItemStack> invHandler = new MEInventoryHandler<>(this, getChannel());
|
||||
|
||||
Reference in new issue
Block a user