1.9 KiB
IScriptWorld.testForBlock
y - Y coordinate of position where particles should be spawned z - Z coordinate of position where particles should be spawned n - How many particles of given type should be spawned dx - X random offset that shift particle relative to X coordinate where it spawned dy - Y random offset that shift particle relative to Y coordinate where it spawned dz - Z random offset that shift particle relative to Z coordinate where it spawned speed - The speed of particle, different particles might use this argument differently args - Additional arguments that can be passed into a particle, for example for "iconcrack" particle you can pass item numeric ID to spawn item particle for a specific item (F3
- H shows the numeric ID of an item)
spawnEntity
default IScriptEntity spawnEntity(java.lang.String id, double x, double y, double z)
Spawn an entity at given position.
var pos = c.getSubject().getPosition();
// Make an explosion at player's feet c.getWorld().spawnEntity("minecraft:tnt", pos.x, pos.y, pos.z);
spawnEntity
IScriptEntity spawnEntity(java.lang.String id, double x, double y, double z, INBTCompound compound)
Spawn an entity at given position with additional data.
var pos = c.getSubject().getPosition();
// Spawn a baby zombie c.getWorld().spawnEntity("minecraft:zombie", pos.x, pos.y + 3, pos.z, mappet.createCompound("{IsBaby:1b}"));
spawnNpc
default IScriptNpc spawnNpc(java.lang.String id, double x, double y, double z)
Spawn an NPC at given position with default state.
var pos = c.getSubject().getPosition();
c.getWorld().spawnNpc("herobrine", pos.x, pos.y, pos.z);
spawnNpc
IScriptNpc spawnNpc(java.lang.String id,