Posted May 11, 20196 yr 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 May 11, 20196 yr by harison513
May 13, 20196 yr Don't bump your own threads, but yes this looks like a vanilla bug in their writer. Fixed in Forge https://github.com/MinecraftForge/MinecraftForge/commit/8c44d6d4cba509c47c7c248abb48248bcf277a37 I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
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.