mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-01-01 05:17:52 +01:00
Fixed an issue where health stacking with pandas may throw an error.
This commit is contained in:
parent
461da02103
commit
5308d1bf44
@ -200,7 +200,9 @@ public class EntityStack {
|
||||
if (entity == null) return;
|
||||
synchronized (healthLock) {
|
||||
entity.setHealth(Settings.STACK_ENTITY_HEALTH.getBoolean()
|
||||
&& !this.health.isEmpty() ? this.health.removeFirst() : entity.getMaxHealth());
|
||||
&& !health.isEmpty()
|
||||
? (health.getFirst() > entity.getMaxHealth() ? entity.getMaxHealth() : health.removeFirst())
|
||||
: entity.getMaxHealth());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user