Commit 6774a95a by Jonathan Thomas

Limiting LEAD particles to 3, and move them further in front of the entity. Also…

Limiting LEAD particles to 3, and move them further in front of the entity. Also scale LEAD particle smaller.
parent 755d651b
Pipeline #12880 passed with stages
in 2 minutes 1 second
......@@ -24,7 +24,7 @@ public class LeadParticle extends SpriteBillboardParticle {
this.velocityZ = 0f;
this.spriteProvider = spriteProvider;
this.angle = (float) angle;
this.scale(6F);
this.scale(4.5F);
this.setMaxAge(40);
this.setSpriteForAge(spriteProvider);
}
......
......@@ -166,9 +166,11 @@ public class LeadPlayerGoal extends PlayerBaseGoal {
minecraftYaw += 360;
}
// Emit particles along the ray using the corrected angle in radians
// Emit particles along the ray from startRange to endRange
double distance = start.distanceTo(end);
for (double d = 0; d <= distance; d += 5) {
double startRange = Math.min(5, distance);;
double endRange = Math.min(startRange + 10, distance);
for (double d = startRange; d <= endRange; d += 5) {
Vec3d pos = start.add(direction.normalize().multiply(d));
emitParticleAt(pos, Math.toRadians(minecraftYaw)); // Convert back to radians for rendering
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment