Fix fuel info being out of sync when tank position changes
Still need to fix the fuel info not showing anything when the last bit is used, seems currentFuel is no longer added
@@ -98,6 +98,7 @@ public class FuelModule implements ContainerData {
private void reset() {
this.fluidHandler = null;
this.itemHandler = null;
+ this.tankDisplayHandlers = null;
this.lastPos = NULL_POS;
}
@@ -256,6 +257,7 @@ public class FuelModule implements ContainerData {
if (temperature.isPresent()) {
itemHandler = null;
fluidHandler = capability;
+ tankDisplayHandlers = null;
capability.addListener(fluidListener);
lastPos = pos;
return temperature.get();
@@ -265,6 +267,7 @@ public class FuelModule implements ContainerData {
temperature = itemCap.map(trySolidFuel(consume));
if (temperature.isPresent()) {
fluidHandler = null;
+ tankDisplayHandlers = null;
itemHandler = itemCap;
itemCap.addListener(itemListener);
lastPos = pos;
@@ -398,6 +401,7 @@ public class FuelModule implements ContainerData {
}
fluidHandler = null;
itemHandler = null;
+ tankDisplayHandlers = null;
}
}
}
