Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 1 out of 2437 tags...
Name<LocationTag.find_structure[structure=<structure>;radius=<#>(;unexplored=<true/{false}>)]>
ReturnsLocationTag
DescriptionFinds the closest structure of the given type within the specified chunk radius (if any), optionally only searching for unexplored ones.
For a list of default structures, see 🔗https://minecraft.wiki/w/Structure#ID.
Alternatively, you can specify a custom structure from a datapack, plugin, etc. as a namespaced key.
See also Tag:server.structures for all structures currently available on the server.
Example
# Use to find the desert temple closest to the player, and tell them what direction it's in.
- define found <player.location.find_structure[structure=desert_pyramid;radius=200].if_null[null]>
- if <[found]> != null:
  - narrate "The closet desert temple is <player.location.direction[<[found]>]> of you!"
- else:
  - narrate "No desert temple found."
Groupfinding
Warning(s)See Language:Structure lookups for potential issues/edge cases in structure lookups.
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/LocationTag.java#L4301