From 228524fd464281405877e48811672eb0f3f2f32e Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Tue, 21 May 2024 15:54:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9RPG=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/mcreator/target/entity/RpgRocketEntity.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/mcreator/target/entity/RpgRocketEntity.java b/src/main/java/net/mcreator/target/entity/RpgRocketEntity.java index c56fa3edc..b31701a5c 100644 --- a/src/main/java/net/mcreator/target/entity/RpgRocketEntity.java +++ b/src/main/java/net/mcreator/target/entity/RpgRocketEntity.java @@ -65,15 +65,14 @@ public class RpgRocketEntity extends ThrowableItemProjectile { 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()) { - ParticleTool.spawnMediumExplosionParticles(this.level(), this.position()); - } - this.discard(); + if (this.level() instanceof ServerLevel level) { + level.explode(this, this.getX(), this.getY(), this.getZ(), 4, Level.ExplosionInteraction.NONE); + + if (!entity.level().isClientSide()) { + ParticleTool.spawnMediumExplosionParticles(this.level(), this.position()); } + this.discard(); } if (entity instanceof LivingEntity) {