[ci skip] rebuild patches

This commit is contained in:
Jake Potrebic
2023-03-23 14:57:03 -07:00
parent 39255145b6
commit 0adc18baf8
60 changed files with 1113 additions and 1197 deletions

View File

@@ -119,13 +119,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper - moved into if below
if (this.level instanceof ServerLevel) {
- if (entity == null || entity.wasKilled((ServerLevel) this.level, this)) {
- this.gameEvent(GameEvent.ENTITY_DIE);
- this.dropAllDeathLoot(damageSource);
- this.createWitherRose(entityliving);
- }
+ // Paper - move below into if for onKill
- this.level.broadcastEntityEvent(this, (byte) 3);
+
+ // Paper start
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
+ if (deathEvent == null || !deathEvent.isCancelled()) {
@@ -153,11 +148,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (entity != null) {
+ entity.wasKilled((ServerLevel) this.level, this);
+ }
+ this.gameEvent(GameEvent.ENTITY_DIE);
this.gameEvent(GameEvent.ENTITY_DIE);
- this.dropAllDeathLoot(damageSource);
- this.createWitherRose(entityliving);
+ } else {
+ this.dead = false;
+ this.setHealth((float) deathEvent.getReviveHealth());
+ }
}
-
- this.level.broadcastEntityEvent(this, (byte) 3);
+ // Paper end
+ this.createWitherRose(entityliving);
}