Fix several bugs with fluids (null vs. EMPTY).

Fix IAEFluidStack NBT serialization.
Fix fluid export bus not exporting.
Fix fluid formation planes.
Fix fluid annihilation planes.
This commit is contained in:
Sebastian Hartte
2020-06-20 00:45:47 +02:00
parent 2458f9c890
commit 2f8cffdd93
18 changed files with 106 additions and 91 deletions
@@ -366,7 +366,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
} else if (action == InventoryAction.EMPTY_ITEM) {
// See how much we can drain from the item
final FluidStack extract = fh.drain(Integer.MAX_VALUE, FluidAction.SIMULATE);
if (extract == null || extract.getAmount() < 1) {
if (extract.isEmpty() || extract.getAmount() < 1) {
return;
}
@@ -378,7 +378,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
final int toStore = (int) (extract.getAmount() - notStorable.getStackSize());
final FluidStack storable = fh.drain(toStore, FluidAction.SIMULATE);
if (storable == null || storable.getAmount() == 0) {
if (storable.isEmpty() || storable.getAmount() == 0) {
return;
} else {
extract.setAmount(storable.getAmount());