SPIGOT-7747: Mob head is not dropped when mob was blown up by a charged creeper

This commit is contained in:
md_5 2024-06-14 19:14:35 +10:00
parent 8078294bca
commit a1d2cd1521
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -64,7 +64,7 @@
+ // CraftBukkit end
this.dead = true;
- this.level().explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionRadius * f, World.a.MOB);
+ this.level().explode(this, this.level().damageSources().explosion(this, this.entityIgniter, net.minecraft.world.damagesource.DamageTypes.EXPLOSION), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB); // CraftBukkit
+ this.level().explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB); // CraftBukkit
this.spawnLingeringCloud();
this.triggerOnDeathMobEffects(Entity.RemovalReason.KILLED);
- this.discard();