1.0.4
All checks were successful
SorceryCraft/pipeline/head This commit looks good

Migrate old worlds to new ID system
This commit is contained in:
TheBrokenRail 2020-03-03 18:52:16 -05:00
parent 28fa7115c6
commit e2cfd1d656
4 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,8 @@
### Changelog
**1.0.4**
* Migrate old worlds to new ID system
**1.0.3**
* Tweak Loot Tables
* Fix Dispenser Bugs

View File

@ -24,12 +24,10 @@ dependencies {
processResources {
inputs.property "version", version
inputs.property "modid", archivesBaseName
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "version": version
expand "modid": archivesBaseName
}
from(sourceSets.main.resources.srcDirs) {

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs = -Xmx1G
loader_version = 0.7.8+build.184
# Mod Properties
mod_version = 1.0.3
mod_version = 1.0.4
maven_group = com.thebrokenrail
archives_base_name = sorcerycraft

View File

@ -1,5 +1,6 @@
package com.thebrokenrail.sorcerycraft.spell;
import com.thebrokenrail.sorcerycraft.SorceryCraft;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
@ -64,7 +65,13 @@ public class SpellTag {
for (int i = 0; i < spells.size(); i++) {
CompoundTag spell = spells.getCompound(i);
Identifier id = new Identifier(spell.getString("id"));
String idStr = spell.getString("id");
Identifier id = new Identifier(idStr);
if (!idStr.equals(id.toString())) {
id = new Identifier(SorceryCraft.NAMESPACE, idStr);
}
int level = spell.getInt("level");
if (map.get(id) == null || map.get(id) < level) {
map.put(id, level);