Skip to content

Commit

Permalink
Use npc.isProtected()
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 10, 2022
1 parent 57d27f3 commit b243d96
Show file tree
Hide file tree
Showing 717 changed files with 1,131 additions and 1,131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public boolean isLeashed() {
if (npc == null) {
return super.isLeashed();
}
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public boolean isLeashed() {
if (npc == null) {
return super.isLeashed();
}
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault)) {
return super.isLeashed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void a(Entity entity, float strength, double dx, double dz) {

@Override
protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) {
return npc == null || !npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)
return npc == null || !npc.isProtected()
? super.a(entityhuman, enumhand, itemstack)
: false;
}
Expand Down Expand Up @@ -168,7 +168,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public boolean d(NBTTagCompound save) {
public boolean di() {
if (npc == null)
return super.di();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
return super.di() && !protectedDefault;
}

Expand Down Expand Up @@ -173,7 +173,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public boolean isLeashed() {
if (npc == null) {
return super.isLeashed();
}
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public NPC getNPC() {
public boolean isLeashed() {
if (npc == null)
return super.isLeashed();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public NPC getNPC() {
public void m() {
if (npc != null) {
npc.update();
if (!npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true)) {
if (!npc.isProtected()) {
super.m();
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public boolean isLeashed() {
if (npc == null) {
return super.isLeashed();
}
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
boolean protectedDefault = npc.isProtected();
if (!protectedDefault || !npc.data().get(NPC.LEASH_PROTECTED_METADATA, protectedDefault))
return super.isLeashed();
if (super.isLeashed()) {
Expand Down
Loading

0 comments on commit b243d96

Please sign in to comment.