61 lines
1.8 KiB
Markdown
61 lines
1.8 KiB
Markdown
# IScriptEntity.unlockRotation
|
|
|
|
[← IScriptEntity](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 15/17 · [önceki](unlockRotation-14.md) · [sonraki](unlockRotation-16.md)
|
|
|
|
Parameters:
|
|
morph - Morph that will be displayed (if null, then it won't send anything).
|
|
expiration - For how many ticks will this displayed morph exist on the client side.
|
|
rotate - Whether attached world morph should replicate entity's rotation (i.e. copy head rotation).
|
|
|
|
displayMorph
|
|
|
|
default void displayMorph(AbstractMorph morph,
|
|
int expiration,
|
|
double x,
|
|
double y,
|
|
double z,
|
|
float yaw,
|
|
float pitch,
|
|
boolean rotate)
|
|
|
|
Display a world morph to all players that see this entity (including themselves) toggleable following rotation and rotation offsets.
|
|
|
|
var s = c.getSubject();
|
|
var morph = mappet.createMorph('{Name:"item"}');
|
|
|
|
s.displayMorph(morph, 100, 0, s.getHeight() + 0.5, 0, 180, 0, true);
|
|
|
|
|
|
Parameters:
|
|
morph - Morph that will be displayed (if null, then it won't send anything).
|
|
expiration - For how many ticks will this displayed morph exist on the client side.
|
|
yaw - Horizontal rotation in degrees.
|
|
pitch - Vertical rotation in degrees.
|
|
rotate - Whether attached world morph should replicate entity's rotation (i.e. copy head rotation).
|
|
|
|
displayMorph
|
|
|
|
void displayMorph(AbstractMorph morph,
|
|
int expiration,
|
|
double x,
|
|
double y,
|
|
double z,
|
|
float yaw,
|
|
float pitch,
|
|
boolean rotate,
|
|
IScriptPlayer player)
|
|
|
|
Display a world morph to given player that sees this entity toggleable following rotation and rotation offsets.
|
|
|
|
// Show this morph only to Notch
|
|
var s = c.getSubject();
|
|
var morph = mappet.createMorph('{Name:"item"}');
|
|
|
|
s.displayMorph(morph, 100, 0, s.getHeight() + 0.5, 0, 180, 0, true, c.getServer().getPlayer("Notch"));
|
|
|
|
|
|
Parameters:
|
|
morph - Morph that will be displayed (if null, then it won't send anything).
|