Re-implement maxLeashDistance world conf and call missing event (#11301)

* Re-implement maxLeashDistance world config and call missing event

* migrate config setting to double or default

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
Lulu13022002
2024-08-25 23:32:32 +02:00
parent 4a97c636b7
commit e24e14e58d
4 changed files with 60 additions and 15 deletions

View File

@@ -52,8 +52,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (entity2 != null) {
if (this != entity2) {
+ // Paper start - Fix item duplication and teleport issues
+ if (this instanceof Mob) {
+ ((Mob) this).dropLeash(true, true); // Paper drop lead
+ if (this instanceof Leashable leashable) {
+ leashable.dropLeash(true, true); // Paper drop lead
+ }
+ // Paper end - Fix item duplication and teleport issues
entity2.restoreFrom(this);