fixed effect inhibitor crash

closes #328
This commit is contained in:
Ell 2023-09-25 13:42:06 +02:00
parent 41214e7b2f
commit 791c6ada5e

View file

@ -68,7 +68,7 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
@Override
protected void defineSynchedData() {
this.entityData.define(EntityEffectInhibitor.INHIBITED_EFFECT, null);
this.entityData.define(EntityEffectInhibitor.INHIBITED_EFFECT, "");
this.entityData.define(EntityEffectInhibitor.COLOR, 0);
this.entityData.define(EntityEffectInhibitor.AMOUNT, 0);
}
@ -168,7 +168,7 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
}
public void setInhibitedEffect(ResourceLocation effect) {
this.entityData.set(EntityEffectInhibitor.INHIBITED_EFFECT, effect != null ? effect.toString() : null);
this.entityData.set(EntityEffectInhibitor.INHIBITED_EFFECT, effect != null ? effect.toString() : "");
}
public int getColor() {
@ -212,4 +212,5 @@ public class EntityEffectInhibitor extends Entity implements IVisualizable {
this.powderListDirty = false;
this.lastEffect = inhibitedEffect;
}
}