Merge branch 'dev' into player-anims

This commit is contained in:
Luis C.M committed 2023-01-05 16:47:36 -06:00
commit 695dfce7d0
3 files changed
+14 -1

No files matched your search

@@ -728,6 +728,11 @@ public class ScriptEntity<T extends Entity> implements IEntity {
entity.rotationYaw = rotation;
}
public void setRotation(float rotationYaw, float rotationPitch) {
entity.rotationYaw = rotationYaw;
entity.rotationPitch = rotationPitch;
}
/**
* @return Current rotation of the entity
*/
@@ -99,10 +99,16 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
return npc.display.name;
}
public void setRotation(float rotationYaw, float rotationPitch) {
this.setRotation(rotationYaw);
npc.rotationPitch = rotationPitch;
}
public void setRotation(float rotation){
npc.ai.orientation = (int)rotation;
super.setRotation(rotation);
}
public void setRotationType(int rotationType){
for (EnumStandingType e : EnumStandingType.values()) {
if (e.ordinal() == rotationType) {
@@ -111,9 +117,11 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
}
}
}
public int getRotationType(){
return npc.ai.standingType.ordinal();
}
/**
* @param name The name of the npc
*/