This commit is contained in:
TheCrunchy committed 2023-07-31 10:52:11 +01:00
1 parent 94b0296a29
commit f3a27551aa
4 files changed
+14 -4

No files matched your search

Binary file not shown.
Binary file not shown.
+3 -1
View File
@@ -71,7 +71,9 @@ public class EntityProjectile implements CrunchProjectile{
if (PlaySound) { if (PlaySound) {
world.playSound(loc, this.SoundType, 20, 2); world.playSound(loc, this.SoundType, 20, 2);
world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0); world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0);
PlaySound = false; if (!DelayedFire) {
PlaySound = false;
}
} }
} }
+11 -3
View File
@@ -31,8 +31,11 @@ public class ExplosiveProjectile implements CrunchProjectile {
public int DelayTime = 6; public int DelayTime = 6;
public Particle ParticleType = Particle.EXPLOSION_LARGE; public Particle ParticleType = Particle.EXPLOSION_LARGE;
public Sound SoundType = Sound.ENTITY_GENERIC_EXPLODE; public Sound SoundType = Sound.ENTITY_GENERIC_EXPLODE;
private boolean PlaySound = true;
@Override @Override
public void Shoot(Player player, Entity entity, Location loc, Float velocity) { public void Shoot(Player player, Entity entity, Location loc, Float velocity) {
PlaySound = true;
int baseDelay = 0; int baseDelay = 0;
for (int i = 0; i < ProjectilesCount; i++) { for (int i = 0; i < ProjectilesCount; i++) {
if (DelayedFire) { if (DelayedFire) {
@@ -63,12 +66,17 @@ public class ExplosiveProjectile implements CrunchProjectile {
tnt.setVelocity(loc.getDirection().multiply(velocity)); tnt.setVelocity(loc.getDirection().multiply(velocity));
} }
if (PlaySound) {
world.playSound(loc, this.SoundType, 20, 2);
world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0);
if (!DelayedFire) {
PlaySound = false;
}
}
// MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.ARROW); // MiscDisguise miscDisguise = new MiscDisguise(DisguiseType.ARROW);
// miscDisguise.setEntity(tnt); // miscDisguise.setEntity(tnt);
// miscDisguise.startDisguise(); // miscDisguise.startDisguise();
world.playSound(loc, this.SoundType, 20, 2);
world.spawnParticle(this.ParticleType, loc.getX(), loc.getY(), loc.getZ(), 0);
} }
private Vector Randomise() { private Vector Randomise() {