修改RPG实体逻辑
This commit is contained in:
parent
c8d4e16338
commit
228524fd46
1 changed files with 6 additions and 7 deletions
|
@ -65,15 +65,14 @@ public class RpgRocketEntity extends ThrowableItemProjectile {
|
||||||
living.level().playSound(null, living.blockPosition(), TargetModSounds.INDICATION.get(), SoundSource.VOICE, 1, 1);
|
living.level().playSound(null, living.blockPosition(), TargetModSounds.INDICATION.get(), SoundSource.VOICE, 1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.getPersistentData().getInt("time") > 0) {
|
|
||||||
if (this.level() instanceof ServerLevel level) {
|
|
||||||
level.explode(this, this.getX(), this.getY(), this.getZ(), 4, Level.ExplosionInteraction.NONE);
|
|
||||||
|
|
||||||
if (!entity.level().isClientSide()) {
|
if (this.level() instanceof ServerLevel level) {
|
||||||
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
|
level.explode(this, this.getX(), this.getY(), this.getZ(), 4, Level.ExplosionInteraction.NONE);
|
||||||
}
|
|
||||||
this.discard();
|
if (!entity.level().isClientSide()) {
|
||||||
|
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
|
||||||
}
|
}
|
||||||
|
this.discard();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity instanceof LivingEntity) {
|
if (entity instanceof LivingEntity) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue