Fixed crash when wearing alicorn amulet. Fixes #400

This commit is contained in:
Sollace 2024-09-16 20:10:38 +01:00
parent 973d788a8c
commit 6436a18d72
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -26,7 +26,7 @@ public interface AttributeContainer {
EntityAttributeModifier modifier = instance.getModifier(id);
if (!MathHelper.approximatelyEquals(desiredValue, modifier == null ? 0 : modifier.getValue())) {
instance.tryRemoveModifier(id);
instance.removeModifier(id);
if (desiredValue != 0) {
if (permanent) {