added block_list and block_tags to handle block tags.

This commit is contained in:
gnembon committed 2020-11-28 02:29:26 -04:00
1 parent 6ee8d55f88
commit b13c59eedf
4 files changed
+52 -1

No files matched your search

+10
View File
@@ -266,6 +266,16 @@ block_state(block('iron_trapdoor[half=top]'),'powered') => false
bool(block_state(block('iron_trapdoor[half=top]'),'powered')) => 0
</pre>
### `block_list()`, `block_list(tag)`
Returns list of all blocks. If tag is provided, returns list of blocks that belong to this 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.
### `block_data(pos)`
Return NBT string associated with specific location, or null if the block does not carry block data. Can be currently
@@ -5,9 +5,11 @@ blast_resistance
block
block_data
block_light
block_list
block_sound
block_state
block_tick
block_tags
blocks_daylight
blocks_movement
brightness
@@ -53,7 +53,7 @@
transparent opacity blocks_daylight emitted_light light block_light sky_light see_sky brightness
hardness blast_resistance top loaded suffocates power ticks_randomly update block_tick random_tick in_slime_chunk
set without_updates
blocks_movement block_sound material map_colour block_state block_data poi set_poi
blocks_movement block_sound material map_colour block_state block_list block_tags block_data poi set_poi
place_item set_biome biome loaded_status generation_status inhabited_time spawn_potential chunk_tickets
structure_eligibility structures structure_references set_structure reset_chunk reload_chunk custom_dimension
add_chunk_ticket