From a4eeeaf6901f07661d1060bca547d9493396f1e9 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:24:13 -0600 Subject: [PATCH] revert testing changes --- .../api/registry/SpellRegistry.java | 2 +- .../entity/spells/sunbeam/Sunbeam.java | 15 +++++++-------- .../spells/ender/TeleportSpell.java | 6 +++--- .../ironsspellbooks/spells/holy/SunbeamSpell.java | 6 ++---- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/api/registry/SpellRegistry.java b/src/main/java/io/redspace/ironsspellbooks/api/registry/SpellRegistry.java index bf054a974..df086f4bb 100644 --- a/src/main/java/io/redspace/ironsspellbooks/api/registry/SpellRegistry.java +++ b/src/main/java/io/redspace/ironsspellbooks/api/registry/SpellRegistry.java @@ -135,7 +135,7 @@ public static AbstractSpell getSpell(ResourceLocation resourceLocation) { public static final RegistryObject GUIDING_BOLT_SPELL = registerSpell(new GuidingBoltSpell()); public static final RegistryObject HEALING_CIRCLE_SPELL = registerSpell(new HealingCircleSpell()); public static final RegistryObject HEAL_SPELL = registerSpell(new HealSpell()); - public static final RegistryObject SUNBEAM_SPELL = registerSpell(new SunbeamSpell()); + //public static final RegistryObject SUNBEAM_SPELL = registerSpell(new SunbeamSpell()); public static final RegistryObject WISP_SPELL = registerSpell(new WispSpell()); public static final RegistryObject DIVINE_SMITE_SPELL = registerSpell(new DivineSmiteSpell()); public static final RegistryObject HASTE_SPELL = registerSpell(new HasteSpell()); diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/sunbeam/Sunbeam.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/sunbeam/Sunbeam.java index d300221b2..b34e03041 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/sunbeam/Sunbeam.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/sunbeam/Sunbeam.java @@ -31,15 +31,14 @@ public Sunbeam(Level level) { @Override public void tick() { - if (tickCount == this.getEffectDuration()) { - if (!level.isClientSide) { - MagicManager.spawnParticles(level, ParticleTypes.LAVA, getX(), getY(), getZ(), 25, getRadius() * .7f, .2f, getRadius() * .7f, 1, true); - MagicManager.spawnParticles(level, ParticleHelper.EMBERS, getX(), getY(), getZ(), 60, getRadius() * .7f, .2f, getRadius() * .7f, 1, true); - } else { - checkHits(); - discard(); - } + if (tickCount == 4) { + checkHits(); + if (!level.isClientSide) + MagicManager.spawnParticles(level, ParticleTypes.FIREWORK, getX(), getY(), getZ(), 9, getRadius() * .7f, .2f, getRadius() * .7f, 1, true); + } + if (this.tickCount > 6) { + discard(); } } diff --git a/src/main/java/io/redspace/ironsspellbooks/spells/ender/TeleportSpell.java b/src/main/java/io/redspace/ironsspellbooks/spells/ender/TeleportSpell.java index 73fd80b31..d24bbe9c7 100644 --- a/src/main/java/io/redspace/ironsspellbooks/spells/ender/TeleportSpell.java +++ b/src/main/java/io/redspace/ironsspellbooks/spells/ender/TeleportSpell.java @@ -38,8 +38,8 @@ public class TeleportSpell extends AbstractSpell { .build(); public TeleportSpell() { - this.baseSpellPower = 0; - this.spellPowerPerLevel = 5; + this.baseSpellPower = 10; + this.spellPowerPerLevel = 10; this.baseManaCost = 20; this.manaCostPerLevel = 2; this.castTime = 0; @@ -145,7 +145,7 @@ public static void particleCloud(Level level, Vec3 pos) { } private float getDistance(int spellLevel, LivingEntity sourceEntity) { - return 10 + getSpellPower(spellLevel, sourceEntity); + return getSpellPower(spellLevel, sourceEntity); } public static class TeleportData implements ICastData { diff --git a/src/main/java/io/redspace/ironsspellbooks/spells/holy/SunbeamSpell.java b/src/main/java/io/redspace/ironsspellbooks/spells/holy/SunbeamSpell.java index 258d545aa..cd249bd8e 100644 --- a/src/main/java/io/redspace/ironsspellbooks/spells/holy/SunbeamSpell.java +++ b/src/main/java/io/redspace/ironsspellbooks/spells/holy/SunbeamSpell.java @@ -7,9 +7,7 @@ import io.redspace.ironsspellbooks.api.spells.*; import io.redspace.ironsspellbooks.api.util.Utils; import io.redspace.ironsspellbooks.capabilities.magic.CastTargetingData; -import io.redspace.ironsspellbooks.capabilities.magic.MagicManager; import io.redspace.ironsspellbooks.entity.spells.sunbeam.Sunbeam; -import io.redspace.ironsspellbooks.particle.ShockwaveParticleOptions; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; @@ -86,12 +84,12 @@ public void onCast(Level level, int spellLevel, LivingEntity entity, CastSource spawn = Utils.moveToRelativeGroundLevel(level, raycast.getLocation().subtract(entity.getForward().normalize()).add(0, 2, 0), 5); } } - MagicManager.spawnParticles(level, new ShockwaveParticleOptions(SchoolRegistry.FIRE.get().getTargetingColor(), -6, true), spawn.x, spawn.y, spawn.z, 1, 0, 0, 0, 0, true); + Sunbeam sunbeam = new Sunbeam(level); sunbeam.setOwner(entity); sunbeam.moveTo(spawn); sunbeam.setDamage(getDamage(spellLevel, entity)); - sunbeam.setEffectDuration(15); + sunbeam.setEffectDuration(getDuration(spellLevel, entity)); level.addFreshEntity(sunbeam); super.onCast(level, spellLevel, entity, castSource, playerMagicData);