diff --git a/main/pom.xml b/main/pom.xml index b826dac38..816d3cff0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 1.16.2-R0.1-SNAPSHOT + 1.16.3-R0.1-SNAPSHOT ${project.version} 1.4.12 diff --git a/main/src/main/java/net/citizensnpcs/npc/CitizensTraitFactory.java b/main/src/main/java/net/citizensnpcs/npc/CitizensTraitFactory.java index 97e97c5e5..0159caf87 100644 --- a/main/src/main/java/net/citizensnpcs/npc/CitizensTraitFactory.java +++ b/main/src/main/java/net/citizensnpcs/npc/CitizensTraitFactory.java @@ -171,8 +171,7 @@ public class CitizensTraitFactory implements TraitFactory { public void registerTrait(TraitInfo info) { Preconditions.checkNotNull(info, "info cannot be null"); if (registered.containsKey(info.getTraitName())) { - System.out.println(info.getTraitClass()); - throw new IllegalArgumentException("trait name already registered"); + throw new IllegalArgumentException("Trait name " + info.getTraitName() + " already registered"); } registered.put(info.getTraitName(), info); if (info.isDefaultTrait()) { diff --git a/main/src/main/resources/messages_en.properties b/main/src/main/resources/messages_en.properties index b9324dd5c..5e01c069a 100644 --- a/main/src/main/resources/messages_en.properties +++ b/main/src/main/resources/messages_en.properties @@ -276,7 +276,7 @@ citizens.commands.waypoints.opendoors.enabled=[[{0}]] will now open doors while citizens.commands.waypoints.opendoors.disabled=[[{0}]] will no longer doors while pathfinding. citizens.commands.wolf.traits-updated=[[{0}]]''s Traits were updated. Angry:[[{1}]], Sitting:[[{2}]], Tamed:[[{3}]], Collar Color:[[{4}]] citizens.conversations.selection.invalid-choice=[[{0}]] is not a valid option. -citizens.economy.error-loading=Unable to use economy handling. Has Vault been enabled? +citizens.economy.error-loading=Vault not found -> no economy handling. citizens.economy.minimum-cost-required=Need at least [[{0}]]. citizens.economy.money-withdrawn=Withdrew [[{0}]] for your NPC. citizens.editors.already-in-editor=You''re already in an editor! diff --git a/v1_16_R2/pom.xml b/v1_16_R2/pom.xml index 73082515b..242e5b3bc 100644 --- a/v1_16_R2/pom.xml +++ b/v1_16_R2/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 1.16.2-R0.1-SNAPSHOT + 1.16.3-R0.1-SNAPSHOT diff --git a/v1_16_R2/src/main/java/net/citizensnpcs/nms/v1_16_R2/util/PlayerNavigation.java b/v1_16_R2/src/main/java/net/citizensnpcs/nms/v1_16_R2/util/PlayerNavigation.java index 878934f53..a49082902 100644 --- a/v1_16_R2/src/main/java/net/citizensnpcs/nms/v1_16_R2/util/PlayerNavigation.java +++ b/v1_16_R2/src/main/java/net/citizensnpcs/nms/v1_16_R2/util/PlayerNavigation.java @@ -40,7 +40,7 @@ public class PlayerNavigation extends NavigationAbstract { protected int e; protected int f; private final AttributeModifiable followRange; - protected Vec3D g = Vec3D.a; + protected Vec3D g = Vec3D.ORIGIN; protected BaseBlockPosition h = BaseBlockPosition.ZERO; protected long i; protected long j; @@ -54,10 +54,11 @@ public class PlayerNavigation extends NavigationAbstract { private int q; private float r = 1.0F; private final PlayerPathfinder s; + private boolean t; public PlayerNavigation(EntityHumanNPC entityinsentient, World world) { super(getDummyInsentient(entityinsentient, world), world); - this.g = Vec3D.a; + this.g = Vec3D.ORIGIN; this.l = 0.5F; this.r = 1.0F; this.a = entityinsentient; @@ -232,8 +233,12 @@ public class PlayerNavigation extends NavigationAbstract { @Override protected void a(Vec3D var0) { if (this.e - this.f > 100) { - if (var0.distanceSquared(this.g) < 2.25D) + if (var0.distanceSquared(this.g) < 2.25D) { + this.t = true; o(); + } else { + this.t = false; + } this.f = this.e; this.g = var0; } @@ -306,7 +311,7 @@ public class PlayerNavigation extends NavigationAbstract { @Override protected Vec3D b() { - return new Vec3D(this.a.locX(), t(), this.a.locZ()); + return new Vec3D(this.a.locX(), u(), this.a.locZ()); } @Override @@ -399,6 +404,7 @@ public class PlayerNavigation extends NavigationAbstract { this.h = BaseBlockPosition.ZERO; this.i = 0L; this.k = 0.0D; + this.t = false; } public boolean f() { @@ -509,7 +515,12 @@ public class PlayerNavigation extends NavigationAbstract { } } - private int t() { + @Override + public boolean t() { + return this.t; + } + + private int u() { if (!this.a.isInWater() || !r()) return MathHelper.floor(this.a.locY() + 0.5D); int var0 = MathHelper.floor(this.a.locY());