chore: cleanup annotations in api adventure patch

This commit is contained in:
Riley Park
2023-03-23 09:49:24 -07:00
parent c4351787c6
commit 39255145b6
64 changed files with 1308 additions and 1246 deletions

View File

@@ -119,8 +119,13 @@ 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()) {
@@ -148,15 +153,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (entity != null) {
+ entity.wasKilled((ServerLevel) this.level, this);
+ }
this.gameEvent(GameEvent.ENTITY_DIE);
- this.dropAllDeathLoot(damageSource);
- this.createWitherRose(entityliving);
+ this.gameEvent(GameEvent.ENTITY_DIE);
+ } else {
+ this.dead = false;
+ this.setHealth((float) deathEvent.getReviveHealth());
}
-
- this.level.broadcastEntityEvent(this, (byte) 3);
+ }
+ // Paper end
+ this.createWitherRose(entityliving);
}