Skip to content

Commit 5df5d7b

Browse files
committed
Fix capacity-based fluid capability not taking into account stack size
1 parent 5aaed85 commit 5df5d7b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

loader-neoforge/src/main/java/org/cyclops/cyclopscore/capability/fluid/FluidHandlerItemCapacity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void setTankCapacity(int tank, int capacity, TransactionContext transacti
6363

6464
@Override
6565
public int getTankCapacity(int tank) {
66-
return itemAccess.getResource().getOrDefault(RegistryEntries.COMPONENT_CAPACITY, this.capacity);
66+
return itemAccess.getAmount() * itemAccess.getResource().getOrDefault(RegistryEntries.COMPONENT_CAPACITY, this.capacity);
6767
}
6868

6969
@Override
@@ -73,7 +73,7 @@ protected int getCapacity(int index, FluidResource resource) {
7373

7474
@Override
7575
public long getCapacityAsLong(int index, FluidResource resource) {
76-
return getTankCapacity(index);
76+
return (long) itemAccess.getAmount() * itemAccess.getResource().getOrDefault(RegistryEntries.COMPONENT_CAPACITY, this.capacity);
7777
}
7878

7979
@Override

0 commit comments

Comments
 (0)