mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 20:55:44 +01:00
Add powermock as a testing dependency
This commit is contained in:
parent
adaaac44d9
commit
650111efd4
13
pom.xml
13
pom.xml
@ -14,6 +14,7 @@
|
|||||||
<craftbukkit.version>LATEST</craftbukkit.version>
|
<craftbukkit.version>LATEST</craftbukkit.version>
|
||||||
<citizensapi.version>2.0.4-SNAPSHOT</citizensapi.version>
|
<citizensapi.version>2.0.4-SNAPSHOT</citizensapi.version>
|
||||||
<vault.version>1.2.18-SNAPSHOT</vault.version>
|
<vault.version>1.2.18-SNAPSHOT</vault.version>
|
||||||
|
<powermock.version>1.4.12</powermock.version>
|
||||||
<build.number>Unknown</build.number>
|
<build.number>Unknown</build.number>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@ -54,6 +55,18 @@
|
|||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.powermock</groupId>
|
||||||
|
<artifactId>powermock-module-junit4</artifactId>
|
||||||
|
<version>${powermock.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.powermock</groupId>
|
||||||
|
<artifactId>powermock-api-mockito</artifactId>
|
||||||
|
<version>${powermock.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<url>http://www.citizensnpcs.com</url>
|
<url>http://www.citizensnpcs.com</url>
|
||||||
|
@ -33,7 +33,6 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||||
private final CitizensNPC npc;
|
private final CitizensNPC npc;
|
||||||
|
|
||||||
private net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null };
|
private net.minecraft.server.ItemStack[] previousEquipment = { null, null, null, null, null };
|
||||||
|
|
||||||
public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string,
|
public EntityHumanNPC(MinecraftServer minecraftServer, World world, String string,
|
||||||
@ -46,11 +45,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
initialise(minecraftServer);
|
initialise(minecraftServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void bf() {
|
|
||||||
super.bf();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float by() {
|
public float by() {
|
||||||
return super.by() * npc.getNavigator().getDefaultParameters().speed();
|
return super.by() * npc.getNavigator().getDefaultParameters().speed();
|
||||||
@ -131,11 +125,11 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
updateEquipment();
|
updateEquipment();
|
||||||
Navigation navigation = getNavigation();
|
|
||||||
if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON)
|
if (Math.abs(motX) < EPSILON && Math.abs(motY) < EPSILON && Math.abs(motZ) < EPSILON)
|
||||||
motX = motY = motZ = 0;
|
motX = motY = motZ = 0;
|
||||||
|
|
||||||
NMS.updateSenses(this);
|
NMS.updateSenses(this);
|
||||||
|
Navigation navigation = getNavigation();
|
||||||
if (!navigation.f()) {
|
if (!navigation.f()) {
|
||||||
navigation.e();
|
navigation.e();
|
||||||
moveOnCurrentHeading();
|
moveOnCurrentHeading();
|
||||||
|
Loading…
Reference in New Issue
Block a user