Fix /npc leashable

This commit is contained in:
fullwall 2022-05-08 21:57:15 +08:00
parent 8979fda81d
commit 8292a952cd
3 changed files with 2 additions and 3 deletions

View File

@ -515,7 +515,8 @@ public class EventListen implements Listener {
if (npc == null) {
return;
}
if (npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
boolean leashProtected = npc.isProtected();
if (npc.data().get(NPC.LEASH_PROTECTED_METADATA, leashProtected)) {
event.setCancelled(true);
}
}

View File

@ -23,7 +23,6 @@ public class PlayerBodyControl {
}
if (e())
if (Math.abs(this.a.aC - this.c) > 15.0F) {
System.out.println("BIG DX");
this.b = 0;
this.c = this.a.aC;
b();

View File

@ -23,7 +23,6 @@ public class PlayerBodyControl {
}
if (e())
if (Math.abs(this.mob.yHeadRot - this.lastStableYHeadRot) > 15.0F) {
System.out.println("BIG DX");
this.lastStableYHeadRot = 0;
this.lastStableYHeadRot = this.mob.yHeadRot;
rotateBodyIfNecessary();