Skip to content

Commit

Permalink
Gale projectiles use the new wind burst particle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Provismet committed Jul 14, 2024
1 parent 5a3eeea commit 19d892a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.provismet.AdditionalArmoury.entity;

import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.Vec3d;
import org.jetbrains.annotations.NotNull;

import com.provismet.AdditionalArmoury.registries.AAEntityTypes;
Expand Down Expand Up @@ -40,6 +43,9 @@ public void onEntityHit (EntityHitResult entityHitResult) {
double dz = this.getOwner().getZ() - living.getZ();
living.takeKnockback(2.0, dx, dz);
living.addVelocity(0, 0.1, 0);

if (this.getWorld() instanceof ServerWorld serverWorld)
serverWorld.spawnParticles(ParticleTypes.GUST,this.getX(), this.getY() + this.getHeight() / 2f, this.getZ(), 1, 0, 0, 0, 0);
}
}

Expand Down

0 comments on commit 19d892a

Please sign in to comment.