修复密集摆放迫击炮时可能出现的炸膛事故
This commit is contained in:
parent
77fdc0c126
commit
8d494f6aee
1 changed files with 7 additions and 7 deletions
|
@ -94,14 +94,14 @@ public class MortarShellEntity extends ThrowableItemProjectile {
|
|||
|
||||
@Override
|
||||
public void onHitEntity(EntityHitResult entityHitResult) {
|
||||
Entity entity = entityHitResult.getEntity();
|
||||
|
||||
entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage);
|
||||
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
ProjectileTool.causeCustomExplode(this, this.damage, this.radius);
|
||||
if (this.tickCount > 1) {
|
||||
Entity entity = entityHitResult.getEntity();
|
||||
entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage);
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
ProjectileTool.causeCustomExplode(this, this.damage, this.radius);
|
||||
}
|
||||
this.discard();
|
||||
}
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue