mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 19:34:09 +00:00
Merge branch 'dev' into player-anims
This commit is contained in:
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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user