mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-24 03:25:13 +01:00
Update for 1.4.4
This commit is contained in:
parent
a8e9817c63
commit
53877a4798
@ -53,9 +53,9 @@ public class CitizensVillagerNPC extends CitizensMobNPC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean c(EntityHuman entityhuman) {
|
public boolean a(EntityHuman entityhuman) {
|
||||||
if (npc == null)
|
if (npc == null)
|
||||||
return super.c(entityhuman);
|
return super.a(entityhuman);
|
||||||
return false; // block trades
|
return false; // block trades
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float by() {
|
public float bB() {
|
||||||
return super.by() * npc.getNavigator().getDefaultParameters().speed();
|
return super.bB() * npc.getNavigator().getDefaultParameters().speed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -146,7 +146,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
private void moveOnCurrentHeading() {
|
private void moveOnCurrentHeading() {
|
||||||
NMS.updateAI(this);
|
NMS.updateAI(this);
|
||||||
// taken from EntityLiving update method
|
// taken from EntityLiving update method
|
||||||
if (bG) {
|
if (bE) {
|
||||||
/* boolean inLiquid = H() || J();
|
/* boolean inLiquid = H() || J();
|
||||||
if (inLiquid) {
|
if (inLiquid) {
|
||||||
motY += 0.04;
|
motY += 0.04;
|
||||||
@ -159,12 +159,12 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
bW = 0;
|
bW = 0;
|
||||||
|
|
||||||
bD *= 0.98F;
|
bD *= 0.98F;
|
||||||
bE *= 0.98F;
|
bH *= 0.98F;
|
||||||
bF *= 0.9F;
|
bF *= 0.9F;
|
||||||
|
|
||||||
float prev = aM;
|
float prev = aM;
|
||||||
aM *= by();
|
aM *= bB();
|
||||||
e(bD, bE); // movement method
|
e(bD, bC); // movement method
|
||||||
aM = prev;
|
aM = prev;
|
||||||
NMS.setHeadYaw(this, yaw);
|
NMS.setHeadYaw(this, yaw);
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,10 @@ public class LookClose extends Trait implements Toggleable, CommandConfigurable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void lookClose(boolean lookClose) {
|
public void lookClose(boolean lookClose) {
|
||||||
enabled = lookClose;
|
enabled = lookClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void findNewTarget() {
|
private void findNewTarget() {
|
||||||
List<Entity> nearby = npc.getBukkitEntity().getNearbyEntities(range, range, range);
|
List<Entity> nearby = npc.getBukkitEntity().getNearbyEntities(range, range, range);
|
||||||
final Location npcLocation = npc.getBukkitEntity().getLocation();
|
final Location npcLocation = npc.getBukkitEntity().getLocation();
|
||||||
Collections.sort(nearby, new Comparator<Entity>() {
|
Collections.sort(nearby, new Comparator<Entity>() {
|
||||||
|
@ -100,7 +100,7 @@ public class NMS {
|
|||||||
handle.motZ *= 0.6D;
|
handle.motZ *= 0.6D;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fireAspectLevel = EnchantmentManager.getFireAspectEnchantmentLevel(handle, target);
|
int fireAspectLevel = EnchantmentManager.getFireAspectEnchantmentLevel(handle);
|
||||||
|
|
||||||
if (fireAspectLevel > 0)
|
if (fireAspectLevel > 0)
|
||||||
target.setOnFire(fireAspectLevel * 4);
|
target.setOnFire(fireAspectLevel * 4);
|
||||||
@ -166,7 +166,7 @@ public class NMS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void look(ControllerLook controllerLook, EntityLiving handle, EntityLiving target) {
|
public static void look(ControllerLook controllerLook, EntityLiving handle, EntityLiving target) {
|
||||||
controllerLook.a(target, 10.0F, handle.bm());
|
controllerLook.a(target, 10.0F, handle.bp());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void look(EntityLiving handle, float yaw, float pitch) {
|
public static void look(EntityLiving handle, float yaw, float pitch) {
|
||||||
@ -281,7 +281,7 @@ public class NMS {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void updateSenses(EntityLiving entity) {
|
public static void updateSenses(EntityLiving entity) {
|
||||||
entity.az().a();
|
entity.aA().a();
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
Loading…
Reference in New Issue
Block a user