mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-14 06:36:35 +01:00
2.0.1
This commit is contained in:
parent
628bf3cd20
commit
5dbb0f83d6
6
pom.xml
6
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.citizensnpcs</groupId>
|
||||
<artifactId>citizens</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.0.1</version>
|
||||
<name>Citizens</name>
|
||||
|
||||
<properties>
|
||||
@ -103,10 +103,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>1.4</version>
|
||||
<configuration>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<minimizeJar>true</minimizeJar>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
|
@ -28,9 +28,7 @@ public class CitizensNavigator implements Navigator {
|
||||
int lastX, lastY, lastZ;
|
||||
private NavigatorParameters localParams = defaultParams;
|
||||
private final CitizensNPC npc;
|
||||
|
||||
private int stationaryTicks;
|
||||
|
||||
private boolean updatedAvoidWater = false;
|
||||
|
||||
public CitizensNavigator(CitizensNPC npc) {
|
||||
|
@ -31,6 +31,7 @@ public class MCNavigationStrategy implements PathStrategy {
|
||||
cancelReason = CancelReason.STUCK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CancelReason getCancelReason() {
|
||||
return cancelReason;
|
||||
}
|
||||
@ -52,6 +53,8 @@ public class MCNavigationStrategy implements PathStrategy {
|
||||
|
||||
@Override
|
||||
public boolean update() {
|
||||
if (cancelReason != null)
|
||||
return true;
|
||||
navigation.a(parameters.avoidWater());
|
||||
navigation.a(parameters.speed());
|
||||
return navigation.f();
|
||||
|
@ -75,12 +75,12 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
|
||||
@Override
|
||||
public boolean update() {
|
||||
if (target == null)
|
||||
return true;
|
||||
if (target.dead) {
|
||||
if (target == null || target.dead) {
|
||||
cancelReason = CancelReason.TARGET_DIED;
|
||||
return true;
|
||||
}
|
||||
if (cancelReason != null)
|
||||
return true;
|
||||
navigation.a(target, parameters.speed());
|
||||
handle.getControllerLook().a(target, 10.0F, handle.bf());
|
||||
if (aggro && canAttack()) {
|
||||
|
@ -135,7 +135,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
bt *= 0.9F;
|
||||
|
||||
float prev = aG;
|
||||
aG *= bs();
|
||||
aG *= bs() * npc.getNavigator().getDefaultParameters().speed();
|
||||
e(br, bs); // movement method
|
||||
aG = prev;
|
||||
as = yaw; // update head yaw to match entity yaw
|
||||
|
@ -160,6 +160,8 @@ public class LinearWaypointProvider implements WaypointProvider {
|
||||
public void load(DataKey key) {
|
||||
for (DataKey root : key.getRelative("points").getIntegerSubKeys()) {
|
||||
root = root.getRelative("location");
|
||||
if (Bukkit.getWorld(root.getString("world")) == null)
|
||||
continue;
|
||||
waypoints.add(new Waypoint(new Location(Bukkit.getWorld(root.getString("world")), root
|
||||
.getDouble("x"), root.getDouble("y"), root.getDouble("z"), (float) root.getDouble("yaw",
|
||||
0), (float) root.getDouble("pitch", 0))));
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Citizens
|
||||
authors: [aPunch, fullwall]
|
||||
softdepend: [Vault]
|
||||
version: 2.0
|
||||
version: 2.0.1
|
||||
main: net.citizensnpcs.Citizens
|
||||
website: http://www.citizensnpcs.net
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user