# Blocks / World API ## Specifying blocks ### `block(x, y, z)`, `block([x,y,z])`, `block(state)` Returns either a block from specified location, or block with a specific state (as used by `/setblock` command), so allowing for block properties, block entity data etc. Blocks otherwise can be referenced everywhere by its simple string name, but its only used in its default state.
block('air') => air
block('iron_trapdoor[half=top]') => iron_trapdoor
block(0,0,0) == block('bedrock') => 1
block('hopper[facing=north]{Items:[{Slot:1b,id:"minecraft:slime_ball",Count:16b}]}') => hopper
Retrieving a block with `block` function has also a side-effect of evaluating its current state and data.
So if you use it later it will reflect block state and data of the block that was when block was called, rather than
when it was used. Block values passed in various places like `scan` functions, etc, are not fully evaluated unless
its properties are needed. This means that if the block at the location changes before its queried in the program this
might result in getting the later state, which might not be desired. Consider the following example:
Throws `unknown_block` if provided input is not valid.
set(10,10,10,'stone'); scan(10,10,10,0,0,0, b = _); set(10,10,10,'air'); print(b); // 'air', block was remembered 'lazily', and evaluated by `print`, when it was already set to air set(10,10,10,'stone'); scan(10,10,10,0,0,0, b = block(_)); set(10,10,10,'air'); print(b); // 'stone', block was evaluated 'eagerly' but call to `block`## World Manipulation All the functions below can be used with block value, queried with coord triple, or 3-long list. All `pos` in the functions referenced below refer to either method of passing block position. ### `set(pos, block, property?, value?, ..., block_data?)`, `set(pos, block, [property?, value?, ...], block_data?)`, `set(pos, block, {property? -> value?, ...}, block_data?)` First argument for the `set` function is either a coord triple, list of three numbers, or a world localized block value. Second argument, `block`, is either an existing block value, a result of `block()` function, or a string value indicating the block name with optional state and block data. It is then followed by an optional `property - value` pairs for extra block state (which can also be provided in a list or a map). Optional `block_data` include the block data to be set for the target block. If `block` is specified only by name, then if a destination block is the same the `set` operation is skipped, otherwise is executed, for other potential extra properties that the original source block may have contained. The returned value is either the block state that has been set, or `false` if block setting was skipped, or failed Throws `unknown_block` if provided block to set is not valid
set(0,5,0,'bedrock') => bedrock
set([0,5,0], 'bedrock') => bedrock
set(block(0,5,0), 'bedrock') => bedrock
scan(0,5,0,0,0,0,set(_,'bedrock')) => 1
set(pos(player()), 'bedrock') => bedrock
set(0,0,0,'bedrock') => 0 // or 1 in overworlds generated in 1.8 and before
scan(0,100,0,20,20,20,set(_,'glass'))
// filling the area with glass
scan(0,100,0,20,20,20,set(_,block('glass')))
// little bit faster due to internal caching of block state selectors
b = block('glass'); scan(0,100,0,20,20,20,set(_,b))
// yet another option, skips all parsing
set(x,y,z,'iron_trapdoor') // sets bottom iron trapdoor
set(x,y,z,'iron_trapdoor[half=top]') // sets the top trapdoor
set(x,y,z,'iron_trapdoor','half','top') // also correct - top trapdoor
set(x,y,z,'iron_trapdoor', ['half','top']) // same
set(x,y,z,'iron_trapdoor', {'half' -> 'top'}) // same
set(x,y,z, block('iron_trapdoor[half=top]')) // also correct, block() provides extra parsing of block state
set(x,y,z,'hopper[facing=north]{Items:[{Slot:1b,id:"minecraft:slime_ball",Count:16b}]}') // extra block data
set(x,y,z,'hopper', {'facing' -> 'north'}, nbt('{Items:[{Slot:1b,id:"minecraft:slime_ball",Count:16b}]}') ) // same
### `without_updates(expr)`
Evaluates subexpression without causing updates when blocks change in the world.
For synchronization sake, as well as from the fact that suppressed update can only happen within a tick,
the call to the `expr` is docked on the main server task.
Consider following scenario: We would like to generate a bunch of terrain in a flat world following a perlin noise
generator. The following code causes a cascading effect as blocks placed on chunk borders will cause other chunks to get
loaded to full, thus generated:
__config() -> {'scope' -> 'global'};
__on_chunk_generated(x, z) -> (
scan(x,0,z,0,0,0,15,15,15,
if (perlin(_x/16, _y/8, _z/16) > _y/16,
set(_, 'black_stained_glass');
)
)
)
The following addition resolves this issue, by not allowing block updates past chunk borders:
__config() -> {'scope' -> 'global'};
__on_chunk_generated(x, z) -> (
without_updates(
scan(x,0,z,0,0,0,15,15,15,
if (perlin(_x/16, _y/8, _z/16) > _y/16,
set(_, 'black_stained_glass');
)
)
)
)
### `place_item(item, pos, facing?, sneak?)`
Uses a given item in the world like it was used by a player. Item names are default minecraft item name,
less the minecraft prefix. Default facing is 'up', but there are other options: 'down', 'north', 'east', 'south',
'west', but also there are other secondary directions important for placement of blocks like stairs, doors, etc.
Try experiment with options like 'north-up' which is placed facing north with cursor pointing to the upper part of the
block, or 'up-north', which means a block placed facing up (player looking down) and placed smidge away of the block
center towards north. Optional sneak is a boolean indicating if a player would be sneaking while placing the
block - this option only affects placement of chests and scaffolding at the moment.
Works with items that have the right-click effect on the block placed, like `bone_meal` on grass or axes on logs,
but doesn't open chests / containers, so have no effect on interactive blocks, like TNT, comparators, etc.
Returns true if placement/use was
successful, false otherwise.
Throws `unknown_item` if `item` doesn't exist
place_item('stone',x,y,z) // places a stone block on x,y,z block
place_item('piston,x,y,z,'down') // places a piston facing down
place_item('carrot',x,y,z) // attempts to plant a carrot plant. Returns true if could place carrots at that position.
place_item('bone_meal',x,y,z) // attempts to bonemeal the ground.
place_item('wooden_axe',x,y,z) // attempts to strip the log.
### `set_poi(pos, type, occupancy?)`
Sets a Point of Interest (POI) of a specified type with optional custom occupancy. By default new POIs are not occupied.
If type is `null`, POI at position is removed. In any case, previous POI is also removed. Available POI types are:
* `'unemployed', 'armorer', 'butcher', 'cartographer', 'cleric', 'farmer', 'fisherman', 'fletcher', 'leatherworker', 'librarian', 'mason', 'nitwit', 'shepherd', 'toolsmith', 'weaponsmith', 'home', 'meeting', 'beehive', 'bee_nest', 'nether_portal'`
Interestingly, `unemployed`, and `nitwit` are not used in the game, meaning, they could be used as permanent spatial
markers for scarpet apps. `meeting` is the only one with increased max occupancy of 32.
Throws `unknown_poi` if the provided point of interest doesn't exist
### `set_biome(pos, biome_name, update=true)`
Changes the biome at that block position. if update is specified and false, then chunk will not be refreshed
on the clients. Biome changes can only be sent to clients with the entire data from the chunk.
Be aware that depending on the MC version and dimension settings biome can be set either in a 1x1x256
column or 4x4x4 hyperblock, so for some versions Y will be ignored and for some precision of biome
setting is less than 1x1x1 block.
Throws `unknown_biome` if the `biome_name` doesn't exist.
### `update(pos)`
Causes a block update at position.
### `block_tick(pos)`
Causes a block to tick at position.
### `random_tick(pos)`
Causes a random tick at position.
### `destroy(pos), destroy(pos, -1), destroy(pos,
mine(x,y,z) ->
(
p = player();
slot = p~'selected_slot';
item_tuple = inventory_get(p, slot);
if (!item_tuple, destroy(x,y,z,'air'); return()); // empty hand, just break with 'air'
[item, count, tag] = item_tuple;
tag_back = destroy(x,y,z, item, tag);
if (tag_back == false, // failed to break the item
return(tag_back)
);
if (tag_back == true, // block broke, tool has no tag
return(tag_back)
);
if (tag_back == null, //item broke
delete(tag:'Damage');
inventory_set(p, slot, count-1, item, tag);
return(tag_back)
);
if (type(tag_back) == 'nbt', // item didn't break, here is the effective nbt
inventory_set(p, slot, count, item, tag_back);
return(tag_back)
);
print('How did we get here?');
)
### `harvest(player, pos)`
Causes a block to be harvested by a specified player entity. Honors player item enchantments, as well as damages the
tool if applicable. If the entity is not a valid player, no block gets destroyed. If a player is not allowed to break
that block, a block doesn't get destroyed either.
### `create_explosion(pos, power?, mode?, fire?, source?, attacker?)`
Creates an explosion at a given position. Parameters work as follows:
- `'power'` - how strong the blast is, negative values count as 0 (default: `4` (TNT power))
- `'mode'` - how to deal with broken blocks: `keep` keeps them, `destroy` destroys them and drops items, and `destroy_with_decay` destroys them, but doesn't always drop the items (default: `destroy_with_decay`)
- `fire` - whether extra fire blocks should be created (default: `false`)
- `source` - entity that is exploding. Note that it will not take explosion damage from this explosion (default: `null`)
- `attacker` - entity responsible for triggering, this will be displayed in death messages, and count towards kill counts, and can be damaged by the explosion (default: `null`)
Explosions created with this endpoint cannot be captured with `__on_explosion` event, however they will be captured
by `__on_explosion_outcome`.
### `weather()`,`weather(type)`,`weather(type, ticks)`
If called with no args, returns `'clear'`, `'rain` or `'thunder'` based on the current weather. If thundering, will
always return `'thunder'`, if not will return `'rain'` or `'clear'` based on the current weather.
With one arg, (either `'clear'`, `'rain` or `'thunder'`), returns the number of remaining ticks for that weather type.
NB: It can thunder without there being a thunderstorm; there has to be both rain and thunder to form a storm. So if
running `weather()` returns `'thunder'`, you can use `weather('rain')>0` to see if there's a storm going on.
With two args, sets the weather to the given `type` for `ticks` ticks.
## Block and World querying
### `pos(block), pos(entity)`
Returns a triple of coordinates of a specified block or entity. Technically entities are queried with `query` function
and the same can be achieved with `query(entity,'pos')`, but for simplicity `pos` allows to pass all positional objects.
pos(block(0,5,0)) => [0,5,0]
pos(player()) => [12.3, 45.6, 32.05]
pos(block('stone')) => Error: Cannot fetch position of an unrealized block
### `pos_offset(pos, direction, amount?)`
Returns a coords triple that is offset in a specified `direction` by `amount` of blocks. The default offset amount is
1 block. To offset into opposite facing, use negative numbers for the `amount`.
pos_offset(block(0,5,0), 'up', 2) => [0,7,0] pos_offset([0,5,0], 'up', -2 ) => [0,3,0]### `(Deprecated) block_properties(pos)` Deprecated by `keys(block_state(pos))`. ### `(Deprecated) property(pos, name)` Deprecated by `block_state(pos, name)` ### `block_state(block)`, `block_state(block, property)` If used with a `block` argument only, it returns a map of block properties and their values. If a block has no properties, returns an empty map. If `property` is specified, returns a string value of that property, or `null` if property is not applicable. Returned values or properties are always strings. It is expected from the user to know what to expect and convert values to numbers using `number()` function or booleans using `bool()` function. Returned string values can be directly used back in state definition in various applications where block properties are required. `block_state` can also accept block names as input, returning block's default state. Throws `unknown_block` if the provided input is not valid.
set(x,y,z,'iron_block'); block_state(x,y,z) => {}
set(x,y,z,'iron_trapdoor','half','top'); block_state(x,y,z) => {waterlogged: false, half: top, open: false, ...}
set(x,y,z,'iron_trapdoor','half','top'); block_state(x,y,z,'half') => top
block_state('iron_trapdoor','half') => top
set(x,y,z,'air'); block_state(x,y,z,'half') => null
block_state(block('iron_trapdoor[half=top]'),'half') => top
block_state(block('iron_trapdoor[half=top]'),'powered') => false
bool(block_state(block('iron_trapdoor[half=top]'),'powered')) => 0
### `block_list()`, `block_list(tag)`
Returns list of all blocks in the game. If `tag` is provided, returns list of all blocks that belong to this block tag.
block_list() => [dark_oak_button, wall_torch, structure_block, polished_blackstone_brick_slab, cherry_sapling... ]
block_list('impermeable') => [glass, white_stained_glass, orange_stained_glass, magenta_stained_glass... ] //All da glass
block_list('rails') => [rail, powered_rail, detector_rail, activator_rail]
block_list('not_a_valid_block_tag') => null //Not a valid block tag
### `block_tags()`, `block_tags(block)`, `block_tags(block, tag)`
Without arguments, returns list of available tags, with block supplied (either by coordinates, or via block name), returns lost
of tags the block belongs to, and if a tag is specified, returns `null` if tag is invalid, `false` if this block doesn't belong
to this tag, and `true` if the block belongs to the tag.
Throws `unknown_block` if `block` doesn't exist
block_tags() => [geode_invalid_blocks, wall_post_override, ice, wooden_stairs, bamboo_blocks, stone_bricks... ]
block_tags('iron_block') => [mineable/pickaxe, needs_stone_tool, beacon_base_blocks]
block_tags('glass') => [impermeable]
block_tags('glass', 'impermeable') => true
block_tags('glass', 'beacon_base_blocks') => false
### `block_data(pos)`
Return NBT string associated with specific location, or null if the block does not carry block data. Can be currently
used to match specific information from it, or use it to copy to another block
block_data(x,y,z) => '{TransferCooldown:0,x:450,y:68, ... }'
### `poi(pos), poi(pos, radius?, type?, status?, column_search?)`
Queries a POI (Point of Interest) at a given position, returning `null` if none is found, or tuple of poi type and its
occupancy load. With optional `type`, `radius` and `status`, returns a list of POIs around `pos` within a
given `radius`. If the `type` is specified, returns only poi types of that types, or everything if omitted or `'any'`.
If `status` is specified (either `'any'`, `'available'`, or `'occupied'`) returns only POIs with that status.
With `column_search` set to `true`, it will return all POIs in a cuboid with `radius` blocks away on x and z, in the entire
block column from 0 to 255. Default (`false`) returns POIs within a spherical area centered on `pos` and with `radius`
radius.
All results of `poi` calls are returned in sorted order with respect to the euclidean distance to the requested center of `pos`.
The return format of the results is a list of poi type, occupancy load, and extra triple of coordinates.
Querying for POIs using the radius is the intended use of POI mechanics, and the ability of accessing individual POIs
via `poi(pos)` in only provided for completeness.
poi(x,y,z) => null // nothing set at position poi(x,y,z) => ['meeting',3] // its a bell-type meeting point occupied by 3 villagers poi(x,y,z,5) => [] // nothing around poi(x,y,z,5) => [['nether_portal',0,[7,8,9]],['nether_portal',0,[7,9,9]]] // two portal blocks in the range### `biome()` `biome(name)` `biome(block)` `biome(block/name, feature)`, `biome(noise_map)` Without arguments, returns the list of biomes in the world. With block, or name, returns the name of the biome in that position, or throws `'unknown_biome'` if provided biome or block are not valid. (1.18+) if passed a map of `continentalness`, `depth`, `erosion`, `humidity`, `temperature`, `weirdness`, returns the biome that exists at those noise values. Note: Have to pass all 6 of the mentioned noise types and only these noise types for it to evaluate a biome. With an optional feature, it returns value for the specified attribute for that biome. Available and queryable features include: * `'top_material'`: unlocalized block representing the top surface material (1.17.1 and below only) * `'under_material'`: unlocalized block representing what sits below topsoil (1.17.1 and below only) * `'category'`: the parent biome this biome is derived from. Possible values include (1.18.2 and below only): `'none'`, `'taiga'`, `'extreme_hills'`, `'jungle'`, `'mesa'`, `'plains'`, `'savanna'`, `'icy'`, `'the_end'`, `'beach'`, `'forest'`, `'ocean'`, `'desert'`, `'river'`, `'swamp'`, `'mushroom'` , `'nether'`, `'underground'` (1.18+) and `'mountain'` (1.18+). * `'tags'`: list of biome tags associated with this biome * `'temperature'`: temperature from 0 to 1 * `'fog_color'`: RGBA color value of fog * `'foliage_color'`: RGBA color value of foliage * `'sky_color'`: RGBA color value of sky * `'water_color'`: RGBA color value of water * `'water_fog_color'`: RGBA color value of water fog * `'humidity'`: value from 0 to 1 indicating how wet is the biome * `'precipitation'`: `'rain'` `'snot'`, or `'none'`... ok, maybe `'snow'`, but that means snots for sure as well. * `'depth'`: (1.17.1 and below only) float value indicating how high or low the terrain should generate. Values > 0 indicate generation above sea level and values < 0, below sea level. * `'scale'`: (1.17.1 and below only) float value indicating how flat is the terrain. * `'features'`: list of features that generate in the biome, grouped by generation steps * `'structures'`: (1.17.1 and below only) list of structures that generate in the biome. ### `solid(pos)` Boolean function, true if the block is solid. ### `air(pos)` Boolean function, true if a block is air... or cave air... or void air... or any other air they come up with. ### `liquid(pos)` Boolean function, true if the block is liquid, or waterlogged (with any liquid). ### `flammable(pos)` Boolean function, true if the block is flammable. ### `transparent(pos)` Boolean function, true if the block is transparent. ### `opacity(pos)` Numeric function, returning the opacity level of a block. ### `blocks_daylight(pos)` Boolean function, true if the block blocks daylight. ### `emitted_light(pos)` Numeric function, returning the light level emitted from the block. ### `light(pos)` Numeric function, returning the total light level at position. ### `block_light(pos)` Numeric function, returning the block light at position (from torches and other light sources). ### `sky_light(pos)` Numeric function, returning the sky light at position (from sky access). ### `effective_light(pos)` Numeric function, returning the "real" light at position, which is affected by time and weather. which also affects mobs spawning, frosted ice blocks melting. ### `see_sky(pos)` Boolean function, returning true if the block can see sky. ### `hardness(pos)` Numeric function, indicating hardness of a block. ### `blast_resistance(pos)` Numeric function, indicating blast_resistance of a block. ### `in_slime_chunk(pos)` Boolean indicating if the given block position is in a slime chunk. ### `top(type, pos)` Returns the Y value of the topmost block at given x, z coords (y value of a block is not important), according to the heightmap specified by `type`. Valid options are: * `light`: topmost light blocking block (1.13 only) * `motion`: topmost motion blocking block * `terrain`: topmost motion blocking block except leaves * `ocean_floor`: topmost non-water block * `surface`: topmost surface block
top('motion', x, y, z) => 63
top('ocean_floor', x, y, z) => 41
### `suffocates(pos)`
Boolean function, true if the block causes suffocation.
### `power(pos)`
Numeric function, returning redstone power level at position.
### `ticks_randomly(pos)`
Boolean function, true if the block ticks randomly.
### `blocks_movement(pos)`
Boolean function, true if the block at position blocks movement.
### `block_sound(pos)`
Returns the name of sound type made by the block at position. One of:
`'wood'`, `'gravel'`, `'grass'`, `'stone'`, `'metal'`, `'glass'`, `'wool'`, `'sand'`, `'snow'`,
`'ladder'`, `'anvil'`, `'slime'`, `'sea_grass'`, `'coral'`, `'bamboo'`', `'shoots'`', `'scaffolding'`', `'berry'`', `'crop'`',
`'stem'`', `'wart'`',
`'lantern'`', `'fungi_stem'`', `'nylium'`', `'fungus'`', `'roots'`', `'shroomlight'`', `'weeping_vines'`', `'soul_sand'`',
`'soul_soil'`', `'basalt'`',
`'wart'`', `'netherrack'`', `'nether_bricks'`', `'nether_sprouts'`', `'nether_ore'`', `'bone'`', `'netherite'`', `'ancient_debris'`',
`'lodestone'`', `'chain'`', `'nether_gold_ore'`', `'gilded_blackstone'`',
`'candle'`', `'amethyst'`', `'amethyst_cluster'`', `'small_amethyst_bud'`', `'large_amethyst_bud'`', `'medium_amethyst_bud'`',
`'tuff'`', `'calcite'`', `'copper'`'
### `(Deprecated) material(pos)`
Returns `'unknown'`. The concept of material for blocks is removed. On previous versions it returned the name of the material the block
was made of.
### `map_colour(pos)`
Returns the map colour of a block at position. One of:
`'air'`, `'grass'`, `'sand'`, `'wool'`, `'tnt'`, `'ice'`, `'iron'`, `'foliage'`, `'snow'`, `'clay'`, `'dirt'`,
`'stone'`, `'water'`, `'wood'`, `'quartz'`, `'adobe'`, `'magenta'`, `'light_blue'`, `'yellow'`, `'lime'`, `'pink'`,
`'gray'`, `'light_gray'`, `'cyan'`, `'purple'`, `'blue'`, `'brown'`, `'green'`, `'red'`, `'black'`, `'gold'`,
`'diamond'`, `'lapis'`, `'emerald'`, `'obsidian'`, `'netherrack'`, `'white_terracotta'`, `'orange_terracotta'`,
`'magenta_terracotta'`, `'light_blue_terracotta'`, `'yellow_terracotta'`, `'lime_terracotta'`, `'pink_terracotta'`,
`'gray_terracotta'`, `'light_gray_terracotta'`, `'cyan_terracotta'`, `'purple_terracotta'`, `'blue_terracotta'`,
`'brown_terracotta'`, `'green_terracotta'`, `'red_terracotta'`, `'black_terracotta'`,
`'crimson_nylium'`, `'crimson_stem'`, `'crimson_hyphae'`, `'warped_nylium'`, `'warped_stem'`, `'warped_hyphae'`, `'warped_wart'`
### `sample_noise()`, `sample_noise(pos, ... types?)` 1.18+
Samples the world generation noise values / data driven density function(s) at a given position.
If no types are passed in, or no arguments are given, it returns a list of all the available registry defined density functions.
With a single function name passed in, it returns a scalar. With multiple function names passed in, it returns a list of results.
Function accepts any registry defined density functions, both built in, as well as namespaced defined in datapacks.
On top of that, scarpet provides the following list of noises sampled directly from the current level (and not returned with no-argument call):
`'barrier_noise'`, `'fluid_level_floodedness_noise'`, `'fluid_level_spread_noise'`, `'lava_noise'`,
`'temperature'`, `'vegetation'`, `'continents'`, `'erosion'`, `'depth'`, `'ridges'`,
`'preliminary_surface_level'`, `'final_density'`, `'vein_toggle'`, `'vein_ridged'` and `'vein_gap'`
// requesting single value sample_density(pos, 'continents') => 0.211626790923 // passing type as multiple arguments sample_density(pos, 'continents', 'depth', 'overworld/caves/pillars', 'mydatapack:foo/my_function') => [-0.205013844481, 1.04772473438, 0.211626790923, 0.123]### `loaded(pos)` Boolean function, true if the block is accessible for the game mechanics. Normally `scarpet` doesn't check if operates on loaded area - the game will automatically load missing blocks. We see this as an advantage. Vanilla `fill/clone` commands only check the specified corners for loadness. To check if a block is truly loaded, I mean in memory, use `generation_status(x) != null`, as chunks can still be loaded outside of the playable area, just are not used by any of the game mechanic processes.
loaded(pos(player())) => 1 loaded(100000,100,1000000) => 0### `(Deprecated) loaded_ep(pos)` Boolean function, true if the block is loaded and entity processing, as per 1.13.2 Deprecated as of scarpet 1.6, use `loaded_status(x) > 0`, or just `loaded(x)` with the same effect ### `loaded_status(pos)` Returns loaded status as per new 1.14 chunk ticket system, 0 for inaccessible, 1 for border chunk, 2 for redstone ticking, 3 for entity ticking ### `is_chunk_generated(pos)`, `is_chunk_generated(pos, force)` Returns `true` if the region file for the chunk exists, `false` otherwise. If optional force is `true` it will also check if the chunk has a non-empty entry in its region file Can be used to assess if the chunk has been touched by the game or not. `generation_status(pos, false)` only works on currently loaded chunks, and `generation_status(pos, true)` will create an empty loaded chunk, even if it is not needed, so `is_chunk_generated` can be used as a efficient proxy to determine if the chunk physically exists. Running `is_chunk_generated` is has no effects on the world, but since it is an external file operation, it is considerably more expensive (unless area is loaded) than other generation and loaded checks. ### `generation_status(pos), generation_status(pos, true)` Returns generation status as per the ticket system. Can return any value from several available but chunks can only be stable in a few states: `full`, `features`, `liquid_carvers`, and `structure_starts`. Returns `null` if the chunk is not in memory unless called with optional `true`. ### `inhabited_time(pos)` Returns inhabited time for a chunk. ### `spawn_potential(pos)` Returns spawn potential at a location (1.16+ only) ### `reload_chunk(pos)` Sends full chunk data to clients. Useful when lots stuff happened and you want to refresh it on the clients. ### `reset_chunk(pos)`, `reset_chunk(from_pos, to_pos)`, `reset_chunk([pos, ...])` Removes and resets the chunk, all chunks in the specified area or all chunks in a list at once, removing all previous blocks and entities, and replacing it with a new generation. For all currently loaded chunks, they will be brought to their current generation status, and updated to the player. All chunks that are not in the loaded area, will only be generated to the `'structure_starts'` status, allowing to generate them fully as players are visiting them. Chunks in the area that has not been touched yet by the game will not be generated / regenerated. It returns a `map` with a report indicating how many chunks were affected, and how long each step took: * `requested_chunks`: total number of chunks in the requested area or list * `affected_chunks`: number of chunks that will be removed / regenerated * `loaded_chunks`: number of currently loaded chunks in the requested area / list * `relight_count`: number of relit chunks * `relight_time`: time took to relit chunks * `layer_count_