mirror of
https://github.com/GTNewHorizons/ThaumicEnergistics.git
synced 2026-10-25 20:32:27 +00:00
add blue cell light info for network status (#76)
This commit is contained in:
1 parent
93bed91c09
commit
16d7a53e5c
2 files changed
+13
-30
No files matched your search
@@ -878,13 +878,19 @@ public class HandlerItemEssentiaCell implements IMEInventoryHandler<IAEFluidStac
|
||||
|
||||
@Override
|
||||
public int getCellStatus() {
|
||||
if (this.getFreeBytes() == 0) {
|
||||
return 3;
|
||||
} else if (this.getFreeTypes() == 0) {
|
||||
return 2;
|
||||
} else {
|
||||
if (this.isCreative()) {
|
||||
return 4;
|
||||
}
|
||||
if (this.getUsedBytes() == 0) {
|
||||
return 1;
|
||||
}
|
||||
if (this.getFreeTypes() > 0) {
|
||||
return 2;
|
||||
}
|
||||
if (this.getFreeTypes() == 0) {
|
||||
return 3;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,8 +57,7 @@ public class ItemEssentiaCell extends Item implements ICellHandler {
|
||||
/**
|
||||
* Status of the cell.
|
||||
*/
|
||||
private static final int CELL_STATUS_MISSING = 0, CELL_STATUS_EMPTY = 1, CELL_STATUS_HAS_ROOM = 2,
|
||||
CELL_STATUS_TYPES_FULL = 3, CELL_STATUS_FULL = 4;
|
||||
private static final int CELL_STATUS_MISSING = 0;
|
||||
|
||||
/**
|
||||
* Icons for each type.
|
||||
@@ -255,29 +254,7 @@ public class ItemEssentiaCell extends Item implements ICellHandler {
|
||||
}
|
||||
|
||||
// Get the inventory handler
|
||||
HandlerItemEssentiaCell cellHandler = (HandlerItemEssentiaCell) handler;
|
||||
|
||||
// Creative?
|
||||
if (cellHandler.isCreative()) {
|
||||
return ItemEssentiaCell.CELL_STATUS_TYPES_FULL;
|
||||
}
|
||||
|
||||
// Total Empty
|
||||
if (cellHandler.getUsedBytes() == 0) {
|
||||
return ItemEssentiaCell.CELL_STATUS_EMPTY;
|
||||
}
|
||||
|
||||
// Full bytes?
|
||||
if (cellHandler.getUsedBytes() == cellHandler.getTotalBytes()) {
|
||||
return ItemEssentiaCell.CELL_STATUS_FULL;
|
||||
}
|
||||
|
||||
// Full types?
|
||||
if (cellHandler.getUsedTypes() == cellHandler.getTotalTypes()) {
|
||||
return ItemEssentiaCell.CELL_STATUS_TYPES_FULL;
|
||||
}
|
||||
|
||||
return ItemEssentiaCell.CELL_STATUS_HAS_ROOM;
|
||||
return ((HandlerItemEssentiaCell) handler).getCellStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user