diff --git a/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java b/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java index 94e97db8..57aafee2 100644 --- a/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java +++ b/src/main/java/com/minelittlepony/unicopia/network/EffectSync.java @@ -31,7 +31,8 @@ public class EffectSync { effect = null; } else { String id = comp.getString("effect_id"); - if (effect == null || id != effect.getName()) { + + if (effect == null || !effect.getName().contentEquals(id)) { effect = SpellRegistry.instance().createEffectFromNBT(comp); } else if (owned.getEntity().world.isRemote) { effect.readFromNBT(comp); diff --git a/src/main/java/com/minelittlepony/unicopia/spell/SpellRegistry.java b/src/main/java/com/minelittlepony/unicopia/spell/SpellRegistry.java index 5b3ad079..abe46699 100644 --- a/src/main/java/com/minelittlepony/unicopia/spell/SpellRegistry.java +++ b/src/main/java/com/minelittlepony/unicopia/spell/SpellRegistry.java @@ -45,7 +45,7 @@ public class SpellRegistry { IMagicEffect effect = getSpellFromName(compound.getString("effect_id")); if (effect != null) { - effect.readFromNBT(compound.getCompoundTag("effect")); + effect.readFromNBT(compound); } return effect;