Skip to content

[Feature request] Structure handling functions. #1284

Description

Some way to load and maybe save NBT structures to the same place that structure blocks save and load them from.
Or load the NBT files from any file location that its allowed to access.

Maybe a function like structure_load(structureName, locationArray, [rotation], [mirror]) to load a saved structure into the world.

So if I use a command block to save a structure named "minecraft:test", i could load it with CommandHelper using
structure_load("minecraft:test", ploc("Steve"))
to place it at Steve's location for example

Activity

  1. PseudoKnight commented on Jun 14, 2021

    @PseudoKnight
    Contributor

    It's worth mentioning that most servers use schematics instead, and there's already support for that through the SKCompat extension and WorldEdit.

    In regards to structures, there's no way to directly load/place one. However, Structure Blocks do have an API that can be used indirectly for this. We could add a function to set structure block data.

    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Structure.html

    It'd look something more like this:

    set_block(@location, 'STRUCTURE_BLOCK');
    set_structure_data(@location, array(structure: 'minecraft:test', mode: 'LOAD', position: @position);
    set_block(location_shift(@location, 'up'), 'REDSTONE_BLOCK');
    set_block(@location, 'AIR');
    set_block(location_shift(@location, 'up'), 'AIR');
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew functionality that doesn't exist yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions