mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Set handle.ax for head yaw
This commit is contained in:
parent
be24157951
commit
8bf6917fd3
@ -16,6 +16,7 @@ import net.minecraft.server.v1_4_R1.ControllerLook;
|
||||
import net.minecraft.server.v1_4_R1.DamageSource;
|
||||
import net.minecraft.server.v1_4_R1.EnchantmentManager;
|
||||
import net.minecraft.server.v1_4_R1.Entity;
|
||||
import net.minecraft.server.v1_4_R1.EntityHuman;
|
||||
import net.minecraft.server.v1_4_R1.EntityLiving;
|
||||
import net.minecraft.server.v1_4_R1.EntityMonster;
|
||||
import net.minecraft.server.v1_4_R1.EntityPlayer;
|
||||
@ -267,6 +268,8 @@ public class NMS {
|
||||
yaw -= 360.0F;
|
||||
}
|
||||
handle.az = yaw;
|
||||
if (!(handle instanceof EntityHuman))
|
||||
handle.ax = yaw;
|
||||
handle.aA = yaw;
|
||||
}
|
||||
|
||||
|
@ -47,9 +47,9 @@ public class Util {
|
||||
public static void faceEntity(LivingEntity from, LivingEntity at) {
|
||||
if (from.getWorld() != at.getWorld())
|
||||
return;
|
||||
double xDiff, yDiff, zDiff;
|
||||
Location atLocation = at.getLocation(AT_LOCATION);
|
||||
Location fromLocation = from.getLocation(FROM_LOCATION);
|
||||
double xDiff, yDiff, zDiff;
|
||||
xDiff = atLocation.getX() - fromLocation.getX();
|
||||
yDiff = atLocation.getY() - fromLocation.getY();
|
||||
zDiff = atLocation.getZ() - fromLocation.getZ();
|
||||
|
Loading…
Reference in New Issue
Block a user