Skip to content

Commit

Permalink
cone of cold ring particle speed incfrease
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Dec 21, 2023
1 parent 427e453 commit 18cd626
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 18cd626

Please sign in to comment.