diff --git a/src/main/java/com/minelittlepony/unicopia/spell/SpellDrake.java b/src/main/java/com/minelittlepony/unicopia/spell/SpellDrake.java index 3f3b8cf1..b77a53c5 100644 --- a/src/main/java/com/minelittlepony/unicopia/spell/SpellDrake.java +++ b/src/main/java/com/minelittlepony/unicopia/spell/SpellDrake.java @@ -50,6 +50,11 @@ public class SpellDrake extends AbstractSpell { return super.getDead(); } + @Override + public boolean isDirty() { + return super.isDirty() || (piggyBackSpell != null && piggyBackSpell.isDirty()); + } + @Override public void onPlaced(ICaster caster) { if (caster.getEntity() instanceof EntitySpell) { @@ -108,7 +113,11 @@ public class SpellDrake extends AbstractSpell { super.readFromNBT(compound); if (compound.hasKey("effect")) { - piggyBackSpell = SpellRegistry.instance().createEffectFromNBT(compound.getCompoundTag("effect")); + if (piggyBackSpell != null) { + piggyBackSpell.readFromNBT(compound.getCompoundTag("effect")); + } else { + piggyBackSpell = SpellRegistry.instance().createEffectFromNBT(compound.getCompoundTag("effect")); + } } } }