diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/CompoundSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/CompoundSpell.java deleted file mode 100644 index d47ecb64..00000000 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/CompoundSpell.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.minelittlepony.unicopia.ability.magic.spell; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import com.minelittlepony.unicopia.ability.magic.spell.effect.CustomisedSpellType; - -import net.minecraft.nbt.NbtCompound; -import net.minecraft.nbt.NbtElement; - -public class CompoundSpell extends AbstractDelegatingSpell { - private final List spells = new ArrayList<>(); - - public CompoundSpell(CustomisedSpellType type) { - super(type); - } - - @Override - public Collection getDelegates() { - return spells; - } - - @Override - public Spell combineWith(Spell other) { - if (other instanceof AbstractDelegatingSpell) { - spells.addAll(((AbstractDelegatingSpell)other).getDelegates()); - } else { - spells.add(other); - } - return this; - } - - @Override - protected void loadDelegates(NbtCompound compound) { - spells.clear(); - if (compound.contains("spells", NbtElement.LIST_TYPE)) { - spells.addAll(Spell.SERIALIZER.readAll(compound.getList("spells", NbtElement.COMPOUND_TYPE)).toList()); - } - } - - @Override - protected void saveDelegates(NbtCompound compound) { - compound.put("spells", Spell.SERIALIZER.writeAll(spells)); - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/Spell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/Spell.java index 3be19ffc..f8b6808b 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/Spell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/Spell.java @@ -90,15 +90,6 @@ public interface Spell extends NbtSerialisable, Affine { */ void onDestroyed(Caster caster); - /** - * Used by crafting to combine two spells into one. - * - * Returns a compound spell representing the union of this and the other spell. - */ - default Spell combineWith(Spell other) { - return SpellType.COMPOUND_SPELL.withTraits().create().combineWith(this).combineWith(other); - } - /** * Converts this spell into a placeable spell. */ diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java index 51be7776..f16ed35a 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/SpellType.java @@ -12,7 +12,6 @@ import com.minelittlepony.unicopia.Unicopia; import com.minelittlepony.unicopia.ability.magic.Affine; import com.minelittlepony.unicopia.ability.magic.SpellPredicate; import com.minelittlepony.unicopia.ability.magic.spell.AbstractDisguiseSpell; -import com.minelittlepony.unicopia.ability.magic.spell.CompoundSpell; import com.minelittlepony.unicopia.ability.magic.spell.DispersableDisguiseSpell; import com.minelittlepony.unicopia.ability.magic.spell.RainboomAbilitySpell; import com.minelittlepony.unicopia.ability.magic.spell.PlaceableSpell; @@ -37,7 +36,6 @@ public final class SpellType implements Affine, SpellPredicate< public static final Registry> REGISTRY = Registries.createSimple(Unicopia.id("spells")); private static final Map>> BY_AFFINITY = new EnumMap<>(Affinity.class); - public static final SpellType COMPOUND_SPELL = register("compound", Affinity.NEUTRAL, 0, false, SpellTraits.EMPTY, CompoundSpell::new); public static final SpellType PLACED_SPELL = register("placed", Affinity.NEUTRAL, 0, false, SpellTraits.EMPTY, PlaceableSpell::new); public static final SpellType THROWN_SPELL = register("thrown", Affinity.NEUTRAL, 0, false, SpellTraits.EMPTY, ThrowableSpell::new);