mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 21:05:06 +00:00
Added setRotation(float rotationYaw, float rotationPitch) function for IEntity & ICustomNpc
This commit is contained in:
1 parent
612a2d7593
commit
28a1650c05
3 files changed
+14
-1
No files matched your search
@@ -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