mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed crash when wearing alicorn amulet. Fixes #400
This commit is contained in:
parent
9d03ad7576
commit
fe39258cff
1 changed files with 1 additions and 3 deletions
|
@ -26,9 +26,7 @@ public interface AttributeContainer {
|
||||||
EntityAttributeModifier modifier = instance.getModifier(id);
|
EntityAttributeModifier modifier = instance.getModifier(id);
|
||||||
|
|
||||||
if (!MathHelper.approximatelyEquals(desiredValue, modifier == null ? 0 : modifier.getValue())) {
|
if (!MathHelper.approximatelyEquals(desiredValue, modifier == null ? 0 : modifier.getValue())) {
|
||||||
if (modifier != null) {
|
instance.removeModifier(id);
|
||||||
instance.removeModifier(modifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (desiredValue != 0) {
|
if (desiredValue != 0) {
|
||||||
if (permanent) {
|
if (permanent) {
|
||||||
|
|
Loading…
Reference in a new issue