Posted October 20, 201410 yr I have a Schematic class that allows me to have easier generation of things, that gets serialised using Json. I'm using GameData.getBlockRegistry().getNameForObject(block); to get the names ("minecraft:grass" for example), and Block.getBlockFromName(name); to get the block back. Is this the suggested way to save blocks (to allow for transfer between worlds)? Also, as a side note, is there any way to set multiple blocks at once? Because otherwise, setting blocks in a 3d plane takes O(n^3) time at best, and Minecraft doesn't support multithreaded world 'block setting' (or multithreaded anything, to be honest). BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 20, 201410 yr Author The reason I'm using Json is because it's supposed to also be easily modified by an average user outside of the game. I'll go give what you suggested a go and see what I can manage, and post here again if I need any help. Thanks. BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
October 20, 201410 yr Hi You might be interested in this class, it does pretty much exactly that. https://github.com/TheGreyGhost/SpeedyTools/blob/master/src/main/java/speedytools/serverside/worldmanipulation/WorldFragment.java There's a fair bit of stuff in there you don't need to worry about (it places asynchronously and also rotates/flips during placement) but writeToWorldAsynchronous_do() shows the key steps. -TGG
October 20, 201410 yr Author It's not that bad if you have some time on your hands, honestly. I've been doing it to test and it's not that bad, especially if you call setPrettyPrinting for the serialiser. BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
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.