修复火箭实体爆炸逻辑
This commit is contained in:
parent
fb2316effa
commit
6541e94efa
1 changed files with 3 additions and 5 deletions
|
@ -133,11 +133,9 @@ public class RpgRocketEntity extends ThrowableItemProjectile {
|
||||||
public void onHitBlock(BlockHitResult blockHitResult) {
|
public void onHitBlock(BlockHitResult blockHitResult) {
|
||||||
super.onHitBlock(blockHitResult);
|
super.onHitBlock(blockHitResult);
|
||||||
|
|
||||||
if (this.getPersistentData().getInt("time") > 0) {
|
if (this.level() instanceof ServerLevel level) {
|
||||||
if (this.level() instanceof ServerLevel level) {
|
level.explode(this, this.getX(), this.getY(), this.getZ(), 6, Level.ExplosionInteraction.NONE);
|
||||||
level.explode(this, this.getX(), this.getY(), this.getZ(), 6, Level.ExplosionInteraction.NONE);
|
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
|
||||||
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.discard();
|
this.discard();
|
||||||
|
|
Loading…
Add table
Reference in a new issue