mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-04 01:39:54 +01:00
Fix NPC targeting
This commit is contained in:
parent
954a3bd27b
commit
516035fc70
@ -842,6 +842,8 @@ public class NPCCommands {
|
||||
String message = " <e>- <a>" + trait.getName();
|
||||
Messaging.send(sender, message);
|
||||
}
|
||||
|
||||
npc.getNavigator().setTarget((Entity) sender, true);
|
||||
}
|
||||
|
||||
@Command(
|
||||
|
@ -177,7 +177,7 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
|
||||
@Override
|
||||
public void setPath() {
|
||||
navigation.a(target, parameters.speed());
|
||||
navigation.a(target, 1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -79,7 +79,8 @@ public class NMS {
|
||||
}
|
||||
|
||||
public static void attack(EntityLiving handle, Entity target) {
|
||||
float f = (float) handle.getAttributeInstance(GenericAttributes.e).getValue();
|
||||
AttributeInstance attackDamage = handle.getAttributeInstance(GenericAttributes.e);
|
||||
float f = (float) (attackDamage == null ? 1 : attackDamage.getValue());
|
||||
int i = 0;
|
||||
|
||||
if (target instanceof EntityLiving) {
|
||||
|
Loading…
Reference in New Issue
Block a user