diff --git a/cb-fullwall.jar b/cb-fullwall.jar
deleted file mode 100644
index 35aae256d..000000000
Binary files a/cb-fullwall.jar and /dev/null differ
diff --git a/pom.xml b/pom.xml
index 5b78e7cca..31a1407f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,8 +54,7 @@
craftbukkit
${craftbukkit.version}
jar
- system
- ${basedir}/cb-fullwall.jar
+ provided
net.citizensnpcs
@@ -126,12 +125,6 @@
org.apache.maven.plugins
maven-jar-plugin
2.3.2
-
-
- net.minecraft.server.*
- org.bukkit.craftbukkit.*
-
-
diff --git a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java
index 1ffb83cc4..08a021d7a 100644
--- a/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java
+++ b/src/main/java/net/citizensnpcs/npc/ai/CitizensNavigator.java
@@ -85,7 +85,6 @@ public class CitizensNavigator implements Navigator, Runnable {
}
public void load(DataKey root) {
- defaultParams.baseSpeed((float) root.getDouble("speed", UNINITIALISED_SPEED));
defaultParams.range((float) root.getDouble("pathfindingrange", Setting.DEFAULT_PATHFINDING_RANGE.asFloat()));
defaultParams.stationaryTicks(root.getInt("stationaryticks", Setting.DEFAULT_STATIONARY_TICKS.asInt()));
defaultParams.speedModifier((float) root.getDouble("speedmodifier", 1F));
@@ -127,7 +126,6 @@ public class CitizensNavigator implements Navigator, Runnable {
}
public void save(DataKey root) {
- root.setDouble("speed", defaultParams.baseSpeed());
root.setDouble("pathfindingrange", defaultParams.range());
root.setInt("stationaryticks", defaultParams.stationaryTicks());
root.setDouble("speedmodifier", defaultParams.speedModifier());
diff --git a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java
index c6b162fe4..d04ef444d 100644
--- a/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java
+++ b/src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java
@@ -154,9 +154,9 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
}
private class NavigationFieldWrapper implements TargetNavigator {
- float e;
boolean j = true, k, l, m;
private final Navigation navigation;
+ float speed;
private NavigationFieldWrapper(Navigation navigation) {
this.navigation = navigation;
@@ -164,18 +164,18 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
this.l = navigation.a();
try {
if (NAV_E != null)
- e = (float) ((AttributeInstance) NAV_E.get(navigation)).e();
+ speed = (float) ((AttributeInstance) NAV_E.get(navigation)).e();
if (NAV_J != null)
j = NAV_J.getBoolean(navigation);
if (NAV_M != null)
m = NAV_M.getBoolean(navigation);
} catch (Exception ex) {
- e = parameters.speed();
+ speed = parameters.speed();
}
}
public PathEntity findPath(Entity from, Entity to) {
- return handle.world.findPath(from, to, e, j, k, l, m);
+ return handle.world.findPath(from, to, speed, j, k, l, m);
}
@Override
diff --git a/src/main/java/net/citizensnpcs/util/NMS.java b/src/main/java/net/citizensnpcs/util/NMS.java
index bc4517346..839ce4d03 100644
--- a/src/main/java/net/citizensnpcs/util/NMS.java
+++ b/src/main/java/net/citizensnpcs/util/NMS.java
@@ -12,6 +12,7 @@ import java.util.WeakHashMap;
import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.npc.entity.EntityHumanNPC;
+import net.minecraft.server.v1_6_R1.AttributeInstance;
import net.minecraft.server.v1_6_R1.ControllerJump;
import net.minecraft.server.v1_6_R1.DamageSource;
import net.minecraft.server.v1_6_R1.EnchantmentManager;
@@ -62,7 +63,8 @@ public class NMS {
}
public static void attack(EntityLiving handle, Entity target) {
- float damage = (float) handle.a(GenericAttributes.e).e();
+ AttributeInstance attribute = handle.a(GenericAttributes.e);
+ float damage = (float) (attribute == null ? 1D : attribute.e());
if (handle.hasEffect(MobEffectList.INCREASE_DAMAGE)) {
damage += 3 << handle.getEffect(MobEffectList.INCREASE_DAMAGE).getAmplifier();
@@ -143,7 +145,10 @@ public class NMS {
public static float getSpeedFor(NPC npc) {
if (!npc.isSpawned())
return DEFAULT_SPEED;
- return (float) NMS.getHandle(npc.getBukkitEntity()).a(GenericAttributes.d).b();
+ // this is correct, but too slow. TODO: investigate
+ // return (float)
+ // NMS.getHandle(npc.getBukkitEntity()).a(GenericAttributes.d).b();
+ return DEFAULT_SPEED;
}
public static boolean inWater(LivingEntity entity) {