The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
8/9/2014
Posts:
98
Location:
U.S
Minecraft:
Inforno
Xbox:
N/A
PSN:
N/A
Member Details
Let me begin by saying I tried to find a topic about this and could not find one, so if someone has already asked or came up with a solution please link me it :P.
So there is a point in mod development where you want to just re-write a section of your mod. This is generally fine as long as you aren't changing block/item/entity ids. However, if you do change it and load a world that has the old ids, you will be prompt with the error of having a world with blocks/items that no longer exist. Giving an example say I made an "Obsidian Sword" and the id is mod:obsidian_sword. Now say if I wanted it to be an "Obsidian Blade" instead and have the id mod:obsidian_blade you will have problems. For you more technical guys out there, I am saying changing BOTH registry and the unlocalized name and convert the id on a world load
You'll see that vanilla will use a "data fixer" to adjust old saves to new formats. It is a fair bit of work honestly, but quite possible. Basically, you create a method which checks whether the save is old and if it is you run special method that goes through the information and changes it. Ideally it does this automatically when someone launches but you could also make the data fixer a separate mod that player just needs to run one time.
Let me begin by saying I tried to find a topic about this and could not find one, so if someone has already asked or came up with a solution please link me it :P.
So there is a point in mod development where you want to just re-write a section of your mod. This is generally fine as long as you aren't changing block/item/entity ids. However, if you do change it and load a world that has the old ids, you will be prompt with the error of having a world with blocks/items that no longer exist. Giving an example say I made an "Obsidian Sword" and the id is mod:obsidian_sword. Now say if I wanted it to be an "Obsidian Blade" instead and have the id mod:obsidian_blade you will have problems. For you more technical guys out there, I am saying changing BOTH registry and the unlocalized name and convert the id on a world load
You'll see that vanilla will use a "data fixer" to adjust old saves to new formats. It is a fair bit of work honestly, but quite possible. Basically, you create a method which checks whether the save is old and if it is you run special method that goes through the information and changes it. Ideally it does this automatically when someone launches but you could also make the data fixer a separate mod that player just needs to run one time.