From 94485404662cddd2c1cf74aa7eb532433e5cfc32 Mon Sep 17 00:00:00 2001 From: MCTBL <30978504+MCTBL@users.noreply.github.com> Date: Sun, 8 Sep 2024 22:15:15 +0800 Subject: [PATCH] add blue light for drive and ME chest (#228) --- .../github/common/storage/FluidCellInventory.java | 9 ++++++--- .../github/common/storage/FluidCellInventoryHandler.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java index 55d8d232..893174d5 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java @@ -188,13 +188,16 @@ public class FluidCellInventory implements IFluidCellInventory { @Override public int getStatusForCell() { - if (this.canHoldNewFluid()) { + if (this.getUsedBytes() == 0) { return 1; } - if (this.getRemainingFluidCount() > 0) { + if (this.canHoldNewFluid()) { return 2; } - return 3; + if (this.getRemainingFluidCount() > 0) { + return 3; + } + return 4; } protected void loadCellFluids() { diff --git a/src/main/java/com/glodblock/github/common/storage/FluidCellInventoryHandler.java b/src/main/java/com/glodblock/github/common/storage/FluidCellInventoryHandler.java index a76eee00..79e0c497 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellInventoryHandler.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellInventoryHandler.java @@ -92,8 +92,8 @@ public class FluidCellInventoryHandler extends MEInventoryHandler public int getStatusForCell() { int val = this.getCellInv().getStatusForCell(); - if (val == 1 && this.isPreformatted()) { - val = 2; + if ((val == 1 || val == 2) && this.isPreformatted()) { + val = 3; } return val;