mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Fixed saving of spell nbt data
This commit is contained in:
parent
3f9029098e
commit
ca1d649b5d
2 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,8 @@ public class EffectSync<T extends EntityLivingBase> {
|
|||
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue