#Using a datapack to edit a structure

1 messages · Page 1 of 1 (latest)

fringe stream
#

hey I am struggling to figure out how I can make a datapack change a structure. So I want the players to be able to buy upgrades to make the build change. I have already built the different versions of the structure and I have saved them all into structure nbt files. How do I get the datapack to place in the structure once the player has triggered it

river mirage
#

You can use /place structure to place structures!

last sorrelBOT
#
Place Syntax

/place feature <feature> [<pos>]
Place the configured feature.
/place jigsaw <pool> <target> <max_depth> [<position>]
Place the jigsaw.
/place structure <structure> [<pos>]
Place the configured structure feature.
/place template <template> [<pos>] [<rotation>] [<mirror>] [<integrity>] [<seed>]
Place the structure template. (Works like using the load button in the UI for a structure block.)

fringe stream
#

yes, I was trying with the /place command but couldn't get it to place in with the structures I had saved

last night
#

You need to create a few files, just the one structure file won’t work

fringe stream
#

what files do i need?

last night
#

Ignore the first one or two in the list (structure set and likely structure json, I’m not 100% sure.)

fringe stream
#

This looks like its for world gen having the custom structure spawn naturally in the world. What i'm looking for is to have the structure placed in once the player has purchased the upgrade

last night
#

Yeah I know. That’s why you miss the first one or two

#

Those are the ones which naturally place it

fringe stream
#

so if I made the template pool part that would make it so i can use /place?

last night
#

Try it and see

fringe stream
#

ok

river mirage
fringe stream
#

yes I managed to get it working, now adding in villagers that will have custom trades for the player to then buy to build upgrades 😄

river mirage
#

sounds great!

#

always happy to help

fringe stream
#

thanks for the help!

edgy vortex
#

Doesn't the /place template <template> [<pos>] work for placing structure files? The reference to the structure file goes in the <template> part. Right?