Posted October 11, 20186 yr I'd like to understand more about how minecraft saves data. I know there is NBT reads and writes but I don't think that is used for everything is it? Let me use an example for my question. On EntityLiving is this member: protected PathNavigate navigator; It holds a variable that I know persists across saves and reloads of the game: protected Path currentPath; So how is this data saved? I don't see any NBT read/write code for it. Does it do something like serialize and write the whole Entity object out to file? Any help to understand this would be great.
October 11, 20186 yr 37 minutes ago, MrChoke said: I know there is NBT reads and writes but I don't think that is used for everything is it? It is used to save everything, what logical thought process would lead a developer to create two different types of saving methods for one game? 39 minutes ago, MrChoke said: It holds a variable that I know persists across saves and reloads of the game: How do you know said variable persists? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 12, 20186 yr Unless there is a writeNBT() type method in the class, or some other class that grabs data from the class, then it probably isn't actually saved. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
October 13, 20186 yr Author So yes I agree, it must only be NBT reds/writes that get things saved. Turns out that path var and many other things actually get re-initialized from scratch when a world is loaded. So if I want to save my own data to the a save, I guess I use what is explained here: https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/
October 14, 20186 yr 3 hours ago, MrChoke said: So yes I agree, it must only be NBT reds/writes that get things saved. Turns out that path var and many other things actually get re-initialized from scratch when a world is loaded. So if I want to save my own data to the a save, I guess I use what is explained here: https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/ Or capabilities About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
October 14, 20186 yr 4 minutes ago, Cadiboo said: Or capabilities Capabilities just wrap around World Saved Data. However it may need to be an entity capability if it is something like the provided example. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.