mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
if we return 0 here then a lot of unrelated problems will be caused, so this is the easiest fix as this scenario is highly unlikely anyway
This commit is contained in:
parent
c571c95fec
commit
031bf3fbc3
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ public class AuraChunk implements IAuraChunk {
|
|||
MutableInt spot = this.getActualDrainSpot(pos, true);
|
||||
int curr = spot.intValue();
|
||||
if (curr < 0 && curr - amount > 0) // Underflow protection
|
||||
return 0;
|
||||
return amount;
|
||||
if (aimForZero) {
|
||||
if (curr > 0 && curr - amount < 0)
|
||||
amount = curr;
|
||||
|
@ -83,7 +83,7 @@ public class AuraChunk implements IAuraChunk {
|
|||
MutableInt spot = this.getActualDrainSpot(pos, true);
|
||||
int curr = spot.intValue();
|
||||
if (curr > 0 && curr + amount < 0) // Overflow protection
|
||||
return 0;
|
||||
return amount;
|
||||
if (aimForZero) {
|
||||
if (curr < 0 && curr + amount > 0) {
|
||||
amount = -curr;
|
||||
|
|
Loading…
Reference in a new issue