mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-12 08:57:39 +02:00
Expand Pose API
This commit is contained in:
parent
59865002cc
commit
c40bddd17f
1 changed files with 36 additions and 0 deletions
|
@ -840,6 +840,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|||
* @param sneak true if the entity should be sneaking
|
||||
*/
|
||||
void setSneaking(boolean sneak);
|
||||
|
||||
/**
|
||||
* Sets the entity's current {@link Pose}.
|
||||
*
|
||||
* <p>Note: While poses affect some things like hitboxes, they do not change the entity's state
|
||||
* (e.g. having {@link Pose#SNEAKING} does not guarantee {@link #isSneaking()} being {@code true}).
|
||||
*
|
||||
* <p>If applied to the {@link Player}, they might see a different pose client-side.
|
||||
*
|
||||
* @param pose a new {@link Pose}
|
||||
* @see #setPose(Pose, boolean)
|
||||
*/
|
||||
default void setPose(@NotNull Pose pose) {
|
||||
setPose(pose, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the entity's current {@link Pose}.
|
||||
*
|
||||
* <p>Note: While poses affect some things like hitboxes, they do not change the entity's state
|
||||
* (e.g. having {@link Pose#SNEAKING} does not guarantee {@link #isSneaking()} being {@code true}).
|
||||
*
|
||||
* <p>If applied to the {@link Player}, they might see a different pose client-side.
|
||||
*
|
||||
* @param pose a new {@link Pose}
|
||||
* @param fixed whether the new {@link Pose} should stay until manually changed
|
||||
*/
|
||||
void setPose(@NotNull Pose pose, boolean fixed);
|
||||
|
||||
/**
|
||||
* Checks whether the entity has a fixed {@link Pose}
|
||||
*
|
||||
* @see #setPose(Pose, boolean)
|
||||
* @return whether the entity has a fixed {@link Pose}
|
||||
*/
|
||||
boolean hasFixedPose();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue