mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-12 00:07:29 +00:00
fix block mode doesn't work in pure fluid pattern
This commit is contained in:
1 parent
1c791480d5
commit
b6b3467251
1 file changed
+10
@@ -183,6 +183,10 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
|
||||
@Override
|
||||
public boolean containsItems() {
|
||||
if (invFluids == null && invItems == null) {
|
||||
// If this entity doesn't has fluid or item inventory, we just view it as full of things.
|
||||
return true;
|
||||
}
|
||||
if (invFluids != null && invFluids.getTankInfo(this.side) != null) {
|
||||
List<FluidTankInfo[]> tankInfos = new LinkedList<>();
|
||||
if (invFluids instanceof TileCableBus && ((TileCableBus) invFluids).getPart(this.side) instanceof PartP2PLiquids) {
|
||||
@@ -212,14 +216,20 @@ public class FluidConvertingInventoryAdaptor extends InventoryAdaptor {
|
||||
} else {
|
||||
tankInfos.add(invFluids.getTankInfo(this.side));
|
||||
}
|
||||
boolean hasTank = false;
|
||||
for (FluidTankInfo[] tankInfoArray : tankInfos) {
|
||||
for (FluidTankInfo tank : tankInfoArray) {
|
||||
hasTank = true;
|
||||
FluidStack fluid = tank.fluid;
|
||||
if (fluid != null && fluid.amount > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasTank && invItems == null) {
|
||||
// If this entity doesn't has fluid or item inventory, we just view it as full of things.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return invItems != null && invItems.containsItems();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user