mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-28 10:12:14 +01:00
Merge pull request #242 from mcmonkey4eva/master
Pull request for damage control
This commit is contained in:
commit
d9b79da086
@ -1,7 +1,6 @@
|
||||
package net.citizensnpcs.npc.ai;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import net.citizensnpcs.Settings.Setting;
|
||||
import net.citizensnpcs.api.ai.EntityTarget;
|
||||
@ -307,8 +306,8 @@ public class CitizensNavigator implements Navigator, Runnable {
|
||||
private static class DoorOpener implements PathCallback {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void run(NPC npc, Block point, ListIterator<Block> path) {
|
||||
if (npc.getStoredLocation().distance(point.getLocation()) < 2) {
|
||||
public void run(NPC npc, Block point, double radius) {
|
||||
if (radius < 2) {
|
||||
boolean bottom = (point.getData() & 8) == 0;
|
||||
Block set = bottom ? point : point.getRelative(BlockFace.DOWN);
|
||||
set.setData((byte) ((set.getData() & 7) | 4));
|
||||
|
@ -76,7 +76,7 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
||||
if (ownerRequired && !npc.getTrait(Owner.class).isOwnedBy(handle.getBukkitEntity())) {
|
||||
return;
|
||||
}
|
||||
handle.setPassengerOf(getHandle());
|
||||
handle.mount(getHandle());
|
||||
}
|
||||
|
||||
private net.minecraft.server.v1_8_R1.Entity getHandle() {
|
||||
|
Loading…
Reference in New Issue
Block a user