From 18cd6260d08b0180ac2d05e696875be6f4c3f555 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 21 Dec 2023 12:11:30 -0600 Subject: [PATCH] cone of cold ring particle speed incfrease --- .../entity/spells/cone_of_cold/ConeOfColdProjectile.java | 6 +++--- .../ironsspellbooks/particle/RingSmokeParticle.java | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java index a06c0f93f..b71d91938 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java @@ -38,7 +38,7 @@ public void spawnParticles() { double z = pos.z; double speed = random.nextDouble() * .4 + .45; - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 10; i++) { double offset = .25; double ox = Math.random() * 2 * offset - offset; double oy = Math.random() * 2 * offset - offset; @@ -50,8 +50,8 @@ public void spawnParticles() { level.addParticle(Math.random() > .05 ? ParticleTypes.SNOWFLAKE : ParticleHelper.SNOWFLAKE, x + ox, y + oy, z + oz, result.x, result.y, result.z); } - if (tickCount % 10 == 0) { - var forward = rotation.scale(.175f); + if (tickCount % 5 == 0) { + var forward = rotation.scale(.5f); level.addParticle(ParticleRegistry.RING_SMOKE_PARTICLE.get(), x, y, z, forward.x, forward.y, forward.z); } } diff --git a/src/main/java/io/redspace/ironsspellbooks/particle/RingSmokeParticle.java b/src/main/java/io/redspace/ironsspellbooks/particle/RingSmokeParticle.java index 04c3e0790..d5f1a0264 100644 --- a/src/main/java/io/redspace/ironsspellbooks/particle/RingSmokeParticle.java +++ b/src/main/java/io/redspace/ironsspellbooks/particle/RingSmokeParticle.java @@ -41,12 +41,13 @@ public class RingSmokeParticle extends TextureSheetParticle { this.xd = xd; this.yd = yd; this.zd = zd; - rx = /*heading.x;*/(float) -Math.asin(yd / new Vec3(xd, yd, zd).length()); + Vec3 deltaMovement = new Vec3(xd, yd, zd); + rx = /*heading.x;*/(float) -Math.asin(yd / deltaMovement.length()); ry = /*heading.y;*/ Mth.HALF_PI - (float) Mth.atan2(zd, xd); this.targetSize = 2;//options.getScale(); this.quadSize = 0; - this.lifetime = (int) (20 + targetSize * 20); + this.lifetime = (int) (20 + Mth.absMax(0, targetSize - deltaMovement.length() * 5) * 20); this.gravity = 0f; float f = random.nextFloat() * 0.14F + 0.85F;