Files

1.9 KiB

IScriptWorld.testForBlock

← IScriptWorld · ← Master

Parça 13/16 · önceki · sonraki

void clone(int x1, int y1, int z1, int x2, int y2, int z2, int xNew, int yNew, int zNew)

Clones am area to another area.

c.getWorld().clone(0, 100, 0, 3, 100, 3, 0, 101, 0);

Parameters: x1 - The first x coordinate. y1 - The first y coordinate. z1 - The first z coordinate. x2 - The second x coordinate. y2 - The second y coordinate. z2 - The second z coordinate. xNew - The new x coordinate. yNew - The new y coordinate. zNew - The new z coordinate.

clone

void clone(int x, int y, int z, int xNew, int yNew, int zNew)

Clones the block to another coordinates.

function main(c) { c.getWorld().clone(0, 80, 0, 0, 83, 0) }

getBlockStackWithTile

IScriptItemStack getBlockStackWithTile(int x, int y,

int z)

Gets the block stack at given position, including tile entity data.

var x= 0, y = 100, z = 0; var world = c.getWorld(); var blockItemStack = world.getBlockStackWithTile(x, y, z); world.setBlock(mappet.createBlockState("minecraft:air", 0), x, y, z) world.dropItemStack(blockItemStack, x+0.5, y+0.5, z+0.5);

createSchematic

MappetSchematic createSchematic()

Returns a new empty Schematic object.

function main(c) { var schematic = c.world.createSchematic(); schematic.loadFromWorld(0, 4, 0, 4, 8, 4).saveToFile("mySchematic").place(0, 4, 4).place(0, 4, 8); }

Returns: IMappetSchematic

displayMorph

default void displayMorph(AbstractMorph morph, int expiration, double x, double y, double z)

Display a world morph to all players around 64 blocks away from given point.

function main(c) { var s = c.getSubject(); var morph = mappet.createMorph('{Name:"item"}'); var pos = s.getPosition();