Jump to content

[1.12] [Solved] Generating Structures with nbt files


GooberGunter

Recommended Posts

I've been trying to make a structure using the nbt files from the structure block but I don't know where to start, are there any guides, tutorials, or original minecraft code that I could look at? I'd look at the igloo code but I haven't been able to find it

 

EDIT: I found it. It just happened to be in the only one I somehow missed: ComponentScatteredFeaturePieces.java

Edited by GooberGunter
Link to comment
Share on other sites

As I said in the other thread, you need to create a Template variable. It takes a TemplateManager (which you can get from WorldServer) and a ResourceLocation for your NBT file (and maybe a couple other parameters). Once you have this, just call the addBlocksToWorld method when you want to generate the structure.

 

I have an example here, though this is kinda complicated code. Just look for Templates in it and it should give you an idea.

Edited by TheXFactor117
  • Like 1

Developer of Levels and Lost Eclipse

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.