From 53877a4798b021a6c05401911b06c85e29353881 Mon Sep 17 00:00:00 2001 From: Jeremy Schroeder Date: Wed, 14 Nov 2012 11:30:45 -0500 Subject: [PATCH] Update for 1.4.4 --- .../citizensnpcs/npc/entity/CitizensVillagerNPC.java | 4 ++-- .../net/citizensnpcs/npc/entity/EntityHumanNPC.java | 12 ++++++------ src/main/java/net/citizensnpcs/trait/LookClose.java | 6 +++--- src/main/java/net/citizensnpcs/util/NMS.java | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java b/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java index 48334578d..b39929bb0 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/CitizensVillagerNPC.java @@ -53,9 +53,9 @@ public class CitizensVillagerNPC extends CitizensMobNPC { } @Override - public boolean c(EntityHuman entityhuman) { + public boolean a(EntityHuman entityhuman) { if (npc == null) - return super.c(entityhuman); + return super.a(entityhuman); return false; // block trades } diff --git a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java index aea5e1c90..204b4b320 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java @@ -45,8 +45,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { } @Override - public float by() { - return super.by() * npc.getNavigator().getDefaultParameters().speed(); + public float bB() { + return super.bB() * npc.getNavigator().getDefaultParameters().speed(); } @Override @@ -146,7 +146,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { private void moveOnCurrentHeading() { NMS.updateAI(this); // taken from EntityLiving update method - if (bG) { + if (bE) { /* boolean inLiquid = H() || J(); if (inLiquid) { motY += 0.04; @@ -159,12 +159,12 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { bW = 0; bD *= 0.98F; - bE *= 0.98F; + bH *= 0.98F; bF *= 0.9F; float prev = aM; - aM *= by(); - e(bD, bE); // movement method + aM *= bB(); + e(bD, bC); // movement method aM = prev; NMS.setHeadYaw(this, yaw); } diff --git a/src/main/java/net/citizensnpcs/trait/LookClose.java b/src/main/java/net/citizensnpcs/trait/LookClose.java index f95aa185e..cd001e742 100644 --- a/src/main/java/net/citizensnpcs/trait/LookClose.java +++ b/src/main/java/net/citizensnpcs/trait/LookClose.java @@ -40,10 +40,10 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable } public void lookClose(boolean lookClose) { - enabled = lookClose; - } + enabled = lookClose; + } - private void findNewTarget() { + private void findNewTarget() { List nearby = npc.getBukkitEntity().getNearbyEntities(range, range, range); final Location npcLocation = npc.getBukkitEntity().getLocation(); Collections.sort(nearby, new Comparator() { diff --git a/src/main/java/net/citizensnpcs/util/NMS.java b/src/main/java/net/citizensnpcs/util/NMS.java index a4ec57674..13dd4184c 100644 --- a/src/main/java/net/citizensnpcs/util/NMS.java +++ b/src/main/java/net/citizensnpcs/util/NMS.java @@ -100,7 +100,7 @@ public class NMS { handle.motZ *= 0.6D; } - int fireAspectLevel = EnchantmentManager.getFireAspectEnchantmentLevel(handle, target); + int fireAspectLevel = EnchantmentManager.getFireAspectEnchantmentLevel(handle); if (fireAspectLevel > 0) target.setOnFire(fireAspectLevel * 4); @@ -166,7 +166,7 @@ public class NMS { } public static void look(ControllerLook controllerLook, EntityLiving handle, EntityLiving target) { - controllerLook.a(target, 10.0F, handle.bm()); + controllerLook.a(target, 10.0F, handle.bp()); } public static void look(EntityLiving handle, float yaw, float pitch) { @@ -281,7 +281,7 @@ public class NMS { } public static void updateSenses(EntityLiving entity) { - entity.az().a(); + entity.aA().a(); } static {