[ci skip] Add more identifying patch comments, merge related patches

This commit is contained in:
Nassim Jahnke
2024-01-19 17:54:05 +01:00
parent 64e5ff904c
commit 3c246dc632
26 changed files with 99 additions and 119 deletions

View File

@@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.dropLeash(true, false);
+ // Paper start - drop leash variable
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.UNKNOWN, false);
+ if (!event.callEvent()) { return; }
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
+ this.dropLeash(true, event.isDropLeash());
+ // Paper end
this.getAllSlots().forEach((itemstack) -> {
@@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.dropLeash(true, true);
+ // Paper start - drop leash variable
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
+ if (!event.callEvent()) return;
+ this.dropLeash(true, event.isDropLeash());
+ // Paper end
}
@@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- this.dropLeash(true, true);
+ // Paper start - drop leash variable
+ EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE, true);
+ this.level().getCraftServer().getPluginManager().callEvent(event); // CraftBukkit
+ if (!event.callEvent()) return;
+ this.dropLeash(true, event.isDropLeash());
+ // Paper end
this.goalSelector.disableControlFlag(Goal.Flag.MOVE);