chore: cleanup annotations in api adventure patch
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user