From 650111efd4c5732f94506e57cb357420aea31cd2 Mon Sep 17 00:00:00 2001 From: fullwall Date: Wed, 31 Oct 2012 15:43:49 +0800 Subject: [PATCH] Add powermock as a testing dependency --- pom.xml | 35 +++++++++++++------ .../npc/entity/EntityHumanNPC.java | 8 +---- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index 705c1b0a5..f7968506a 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,7 @@ LATEST 2.0.4-SNAPSHOT 1.2.18-SNAPSHOT + 1.4.12 Unknown @@ -26,20 +27,20 @@ everything http://repo.citizensnpcs.com - - vault-repo - http://ci.herocraftonline.com/plugin/repository/everything - + + vault-repo + http://ci.herocraftonline.com/plugin/repository/everything + - - net.milkbowl.vault - Vault - ${vault.version} - jar - provided - + + net.milkbowl.vault + Vault + ${vault.version} + jar + provided + org.bukkit craftbukkit @@ -54,6 +55,18 @@ jar compile + + org.powermock + powermock-module-junit4 + ${powermock.version} + test + + + org.powermock + powermock-api-mockito + ${powermock.version} + test + http://www.citizensnpcs.com diff --git a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java index 4893e5a35..602c8ef9e 100644 --- a/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java +++ b/src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java @@ -33,7 +33,6 @@ import org.bukkit.util.Vector; public class EntityHumanNPC extends EntityPlayer implements NPCHolder { private final CitizensNPC npc; - private net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null }; public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string, @@ -46,11 +45,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { initialise(minecraftServer); } - @Override - public void bf() { - super.bf(); - } - @Override public float by() { return super.by() * npc.getNavigator().getDefaultParameters().speed(); @@ -131,11 +125,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder { return; updateEquipment(); - Navigation navigation = getNavigation(); if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON) motX = motY = motZ = 0; NMS.updateSenses(this); + Navigation navigation = getNavigation(); if (!navigation.f()) { navigation.e(); moveOnCurrentHeading();