68 lines
1.9 KiB
Markdown
68 lines
1.9 KiB
Markdown
# IScriptWorld.testForBlock
|
|
|
|
[← IScriptWorld](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 14/16 · [önceki](testForBlock-13.md) · [sonraki](testForBlock-15.md)
|
|
|
|
c.getWorld().displayMorph(morph, 100, pos.x, pos.y + s.getHeight() + 0.5, pos.z);
|
|
}
|
|
|
|
|
|
displayMorph
|
|
|
|
default void displayMorph(AbstractMorph morph,
|
|
int expiration,
|
|
double x,
|
|
double y,
|
|
double z,
|
|
int range)
|
|
|
|
Display a world morph to all players at given point.
|
|
|
|
var s = c.getSubject();
|
|
var morph = mappet.createMorph('{Name:"item"}');
|
|
var pos = s.getPosition();
|
|
|
|
// This will display a diamond hoe morph on top of the
|
|
// player's head (but it won't track player's movement)
|
|
c.getWorld().displayMorph(morph, 100, pos.x, pos.y + s.getHeight() + 0.5, pos.z, 64);
|
|
|
|
|
|
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.
|
|
range - How many blocks far away will this send to players around given point.
|
|
|
|
displayMorph
|
|
|
|
default void displayMorph(AbstractMorph morph,
|
|
int expiration,
|
|
double x,
|
|
double y,
|
|
double z,
|
|
float yaw,
|
|
float pitch)
|
|
|
|
Display a world morph to all players at given point with rotation.
|
|
|
|
var s = c.getSubject();
|
|
var morph = mappet.createMorph('{Name:"item"}');
|
|
var pos = s.getPosition();
|
|
|
|
// This will display a diamond hoe morph on top of the
|
|
// player's head (but it won't track player's movement)
|
|
// oriented at west
|
|
c.getWorld().displayMorph(morph, 100, pos.x, pos.y + s.getHeight() + 0.5, pos.z, 90, 0);
|
|
|
|
|
|
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.
|
|
|
|
displayMorph
|
|
|
|
default void displayMorph(AbstractMorph morph,
|
|
int expiration,
|