Jump to content

[1.13.2] Writing Template to NBT Throws [Bug?]


harison513

Recommended Posts

I am testing out templates and am trying to write one to NBT to see the structure of the NBT tag, however, even though I am just loading a vanilla file, it always throws an out of range exception.

 

Template template = server.getStructureTemplateManager().getTemplate(new ResourceLocation("minecraft:shipwreck/sideways_fronthalf_degraded"));
NBTTagCompound c = template.writeToNBT(new NBTTagCompound());

 

 Looking at the actual Template::writeToNBT method, it looks like here the first j is supposed to be an l, as in this case 'blocks' has only 8 items, but each of those items has 250+ plus inside them and looking at the surrounding for loops this seems to make sense.

 

for(int l = 1; l < this.blocks.size(); ++l) {
   Template.BasicPalette template$basicpalette1 = list.get(l);
   template$basicpalette1.addMapping((this.blocks.get(j).get(j)).blockState, k);
}

 

Am I missing something here? I am just trying to write a vanilla template to NBT and it fails?

Edited by harison513
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.