mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-20 03:44: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;
|
effect = null;
|
||||||
} else {
|
} else {
|
||||||
String id = comp.getString("effect_id");
|
String id = comp.getString("effect_id");
|
||||||
if (effect == null || id != effect.getName()) {
|
|
||||||
|
if (effect == null || !effect.getName().contentEquals(id)) {
|
||||||
effect = SpellRegistry.instance().createEffectFromNBT(comp);
|
effect = SpellRegistry.instance().createEffectFromNBT(comp);
|
||||||
} else if (owned.getEntity().world.isRemote) {
|
} else if (owned.getEntity().world.isRemote) {
|
||||||
effect.readFromNBT(comp);
|
effect.readFromNBT(comp);
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class SpellRegistry {
|
||||||
IMagicEffect effect = getSpellFromName(compound.getString("effect_id"));
|
IMagicEffect effect = getSpellFromName(compound.getString("effect_id"));
|
||||||
|
|
||||||
if (effect != null) {
|
if (effect != null) {
|
||||||
effect.readFromNBT(compound.getCompoundTag("effect"));
|
effect.readFromNBT(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
|
|
Loading…
Reference in a new issue