mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-28 02:01:35 +01:00
Change to pathfinding
This commit is contained in:
parent
50b98ae39e
commit
4191705cce
@ -27,10 +27,10 @@ public class EquipmentEditor extends Editor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void begin() {
|
public void begin() {
|
||||||
Messaging.send(player, "<2>Entered the equipment editor!");
|
Messaging.send(player, "<a>Entered the equipment editor!");
|
||||||
Messaging.send(player, "<e>Right click <a>to equip armor and items.");
|
Messaging.send(player, "<a>Right click to equip armor and items.");
|
||||||
Messaging.send(player, "<e>Right click <a>while <e>crouching <a>to equip armor in the NPC's hand.");
|
Messaging.send(player, "<a>Right click while crouching to equip armor in the NPC's hand.");
|
||||||
Messaging.send(player, "<e>Right click <a>with an <e>empty hand <a>to remove all armor and items.");
|
Messaging.send(player, "<a>Right click with an empty hand to remove all armor and items.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -100,15 +100,17 @@ public class EquipmentEditor extends Editor {
|
|||||||
Messaging.send(player, "<e>" + npc.getName() + " <a>had all of its items removed.");
|
Messaging.send(player, "<e>" + npc.getName() + " <a>had all of its items removed.");
|
||||||
}
|
}
|
||||||
// Now edit the equipment based on the slot
|
// Now edit the equipment based on the slot
|
||||||
if (trait.get(slot) != null && trait.get(slot).getType() != Material.AIR)
|
if (trait.get(slot) != null) {
|
||||||
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.get(slot));
|
player.getWorld().dropItemNaturally(npc.getBukkitEntity().getLocation(), trait.get(slot));
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack set = hand;
|
ItemStack set = hand;
|
||||||
if (set != null && set.getType() != Material.AIR) {
|
if (set != null && set.getType() != Material.AIR) {
|
||||||
if (hand.getAmount() > 1)
|
if (hand.getAmount() > 1) {
|
||||||
hand.setAmount(hand.getAmount() - 1);
|
hand.setAmount(hand.getAmount() - 1);
|
||||||
else
|
} else {
|
||||||
hand = null;
|
hand = null;
|
||||||
|
}
|
||||||
player.setItemInHand(hand);
|
player.setItemInHand(hand);
|
||||||
set.setAmount(1);
|
set.setAmount(1);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class MoveStrategy implements PathStrategy {
|
|||||||
handle.yaw += getYawDifference(diffZ, diffX);
|
handle.yaw += getYawDifference(diffZ, diffX);
|
||||||
if (vector.b - yHeight > 0.0D)
|
if (vector.b - yHeight > 0.0D)
|
||||||
jump();
|
jump();
|
||||||
handle.d();
|
handle.d(handle.ar());
|
||||||
// handle.walk();
|
// handle.walk();
|
||||||
|
|
||||||
if (handle.positionChanged)
|
if (handle.positionChanged)
|
||||||
|
Loading…
Reference in New Issue
Block a user