diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java deleted file mode 100644 index 2831fd13..00000000 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/FaithfulAssistantSpell.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.minelittlepony.unicopia.magic.spell; - -import javax.annotation.Nullable; - -import com.minelittlepony.unicopia.entity.FollowCasterGoal; -import com.minelittlepony.unicopia.entity.SpellcastEntity; -import com.minelittlepony.unicopia.magic.Affinity; -import com.minelittlepony.unicopia.magic.Caster; -import com.minelittlepony.unicopia.magic.Spell; - -import net.minecraft.entity.ai.goal.SwimGoal; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.util.math.Box; - -/** - * Spike The Dragon, but in rock form. - * - * It follows you around and can pick up/carry other gems. - * - * @Deprecated Replace with a minion mob - */ -@Deprecated -public class FaithfulAssistantSpell extends AbstractSpell { - - private static final Box EFFECT_BOUNDS = new Box(-2, -2, -2, 2, 2, 2); - - @Nullable - private Spell piggyBackSpell; - - @Override - public String getName() { - return "drake"; - } - - @Override - public Affinity getAffinity() { - return Affinity.GOOD; - } - - @Override - public int getTint() { - return 0xFAEBD7; - } - - @Override - public void setDead() { - super.setDead(); - - if (piggyBackSpell != null) { - piggyBackSpell.setDead(); - } - } - - @Override - public boolean allowAI() { - return true; - } - - @Override - public boolean isDead() { - return super.isDead(); - } - - @Override - public boolean isDirty() { - return super.isDirty() || (piggyBackSpell != null && piggyBackSpell.isDirty()); - } - - @SuppressWarnings("unchecked") - @Override - public void onPlaced(Caster caster) { - if (caster.getEntity() instanceof SpellcastEntity) { - SpellcastEntity living = (SpellcastEntity)caster.getEntity(); - - living.getNavigation().setCanSwim(false); - living.getGoals().add(1, new SwimGoal(living)); - living.getGoals().add(2, new FollowCasterGoal<>((Caster)caster, 1, 4, 70)); - - living.setPos(living.getX(), living.getY(), living.getZ()); - } - } - - @Override - public boolean update(Caster source) { - if (piggyBackSpell == null) { - Box bb = EFFECT_BOUNDS.offset(source.getOriginVector()); - - source.getWorld().getEntities(source.getEntity(), bb, e -> e instanceof SpellcastEntity).stream() - .map(i -> (SpellcastEntity)i) - .filter(i -> i.hasSpell() && !(i.getSpell() instanceof FaithfulAssistantSpell)) - .findFirst().ifPresent(i -> { - piggyBackSpell = i.getSpell().copy(); - piggyBackSpell.onPlaced(source); - i.setSpell(null); - setDirty(true); - }); - } - - if (piggyBackSpell != null) { - piggyBackSpell.update(source); - } - - return true; - } - - @Override - public void render(Caster source) { - if (piggyBackSpell != null) { - piggyBackSpell.render(source); - } - } - - @Override - public void toNBT(CompoundTag compound) { - super.toNBT(compound); - - if (piggyBackSpell != null) { - compound.put("effect", SpellRegistry.toNBT(piggyBackSpell)); - } - } - - @Override - public void fromNBT(CompoundTag compound) { - super.fromNBT(compound); - - if (compound.contains("effect")) { - if (piggyBackSpell != null) { - piggyBackSpell.fromNBT(compound.getCompound("effect")); - } else { - piggyBackSpell = SpellRegistry.instance().createEffectFromNBT(compound.getCompound("effect")); - } - } - } -} diff --git a/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java b/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java index e4a13fc8..7ff9c7d8 100644 --- a/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java +++ b/src/main/java/com/minelittlepony/unicopia/magic/spell/SpellRegistry.java @@ -43,7 +43,6 @@ public class SpellRegistry { register(PortalSpell::new); register(AwkwardSpell::new); register(InfernoSpell::new); - register(FaithfulAssistantSpell::new); register(RevealingSpell::new); register(DarknessSpell::new); register(FlameSpell::new); diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 29830c89..44200326 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -147,9 +147,6 @@ "spell.ice": "Frost", "spell.ice.tagline": "Ice I", - "spell.drake": "Assistance", - "spell.drake.tagline": "Golomancy I", - "curse.shield": "Repulsion", "curse.shield.tagline": "Hostility I", diff --git a/src/main/resources/data/unicopia/recipes/enchantments/drake.json b/src/main/resources/data/unicopia/recipes/enchantments/drake.json deleted file mode 100644 index 5a93e523..00000000 --- a/src/main/resources/data/unicopia/recipes/enchantments/drake.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "type": "unicopia:enchanting_spell", - "input": { "item": "unicopia:gem" }, - "ingredients": [ - { "item": "unicopia:gem", "spell": "charge" }, - { "item": "unicopia:corrupted_gem" }, - { "tag": "unicopia:life_elementals" }, - { "item": "minecraft:poppy" } - ], - "result": { "item": "unicopia:gem", "spell": "drake" } -} \ No newline at end of file