Skip to content

Commit

Permalink
Added 2 small helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rundas01 committed Sep 27, 2024
1 parent 41283f3 commit 22ba92a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ public boolean isEmpty() {
return isEmpty;
}

private long getSpace(int slot){
return this.getStorages()[slot].getCapacity() - this.getStorages()[slot].getFluidAmount();
}

private long getTotalSpace(){
long total = 0;
for (FluidStorage storage : this.getStorages()) {
total += storage.getCapacity() - storage.getFluidAmount();
}
return total;
}

public void exportToNearby(@NotNull Direction... facings) {
if (isEmpty()) return;
var level = getMachine().getLevel();
Expand Down

0 comments on commit 22ba92a

Please sign in to comment.