76 lines
1.8 KiB
Markdown
76 lines
1.8 KiB
Markdown
# IScriptWorld.testForBlock
|
|
|
|
[← IScriptWorld](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 10/16 · [önceki](testForBlock-9.md) · [sonraki](testForBlock-11.md)
|
|
|
|
var pos = s.getPosition();
|
|
|
|
c.getWorld().explode(pos.x, pos.y, pos.z, 10)
|
|
}
|
|
|
|
|
|
explode
|
|
|
|
default void explode(double x,
|
|
double y,
|
|
double z,
|
|
float distance,
|
|
boolean blazeGround,
|
|
boolean destroyTerrain)
|
|
|
|
Make an explosion in this world at given coordinates, and distance with options to place fire and destroy blocks. See explode(IScriptEntity, double, double, double, float, boolean,
|
|
boolean) for more thorough definition of arguments.
|
|
|
|
function main(c)
|
|
{
|
|
var s = c.getSubject();
|
|
var pos = s.getPosition();
|
|
|
|
c.getWorld().explode(pos.x, pos.y, pos.z, 10, false, false)
|
|
}
|
|
|
|
|
|
explode
|
|
|
|
void explode(IScriptEntity exploder,
|
|
|
|
|
|
|
|
double x,
|
|
double y,
|
|
double z,
|
|
float distance,
|
|
boolean blazeGround,
|
|
boolean destroyTerrain)
|
|
|
|
Make an explosion in this world at given coordinates, distance, and entity that caused the explosion.
|
|
|
|
function main(c)
|
|
{
|
|
var s = c.getSubject();
|
|
var pos = s.getPosition();
|
|
|
|
c.getWorld().explode(s, pos.x, pos.y, pos.z, 10, false, false)
|
|
}
|
|
|
|
|
|
Parameters:
|
|
exploder - Entity that causes explosion that won't receive damage from it.
|
|
x - X coordinate in the world at which explosion must be caused.
|
|
y - Y coordinate in the world at which explosion must be caused.
|
|
z - Z coordinate in the world at which explosion must be caused.
|
|
distance - Radius (in blocks of the explosion).
|
|
blazeGround - Whether fire blocks should be placed randomly on top of remaining blocks.
|
|
destroyTerrain - Whether blocks should be destroyed by the explosion.
|
|
|
|
rayTrace
|
|
|
|
IScriptRayTrace rayTrace(double x1,
|
|
double y1,
|
|
double z1,
|
|
double x2,
|
|
double y2,
|
|
double z2)
|
|
|