Skip to content

Commit

Permalink
SurfaceWindParticle.java
Browse files Browse the repository at this point in the history
  • Loading branch information
warior456 committed Dec 3, 2023
1 parent a972984 commit 04076a4
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ public Factory(SpriteProvider spriteProvider) {
}

@Override
public Particle createParticle(DefaultParticleType defaultParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) {
if ((clientWorld.getTopPosition(Heightmap.Type.MOTION_BLOCKING, new BlockPos((int) d, (int) e, (int) f)).getY()) > e) {
public Particle createParticle(DefaultParticleType defaultParticleType, ClientWorld clientWorld, double x, double y, double z, double g, double h, double i) {
BlockPos pos = new BlockPos((int) x, (int) y, (int) z);
// Check if the top Y position is greater than y, if so return null to spawn no particle
if (clientWorld.getTopPosition(Heightmap.Type.MOTION_BLOCKING, pos).getY() > y) {
return null;
}
return new SurfaceWindParticle(clientWorld, d, e, f, 0.5f, 0.05f, 0.5f, 0.4f, -0.05f, 0.4f, 1.0f, this.spriteProvider, 0.9f, 20, 0.002f, true);

SurfaceWindParticle particle = new SurfaceWindParticle(clientWorld, x, y, z, 0.5f, 0.05f, 0.5f, 0.4f, -0.05f, 0.4f, 1.0f, this.spriteProvider, 0.9f, 20, 0.002f, true);
return particle;
}


Expand Down

0 comments on commit 04076a4

Please sign in to comment.