Added set/getPitch to ScriptEntity

This commit is contained in:
luisc committed 2022-02-01 05:10:38 -06:00
1 parent 90ca1a0200
commit 632e92f82e
1 file changed
+5 -1
@@ -509,12 +509,16 @@ public class ScriptEntity<T extends Entity> implements IEntity {
}
/**
* @return Current rotation of the npc
* @return Current rotation of the entity
*/
public float getRotation(){
return entity.rotationYaw;
}
public void setPitch(float pitch){entity.rotationPitch = pitch;}
public float getPitch(){return entity.rotationPitch;}
/**
* @param power How strong the knockback is
* @param direction The direction in which he flies back (0-360). Usually based on getRotation()