diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index 7eeffb9a4..1e1ec683a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.misc.update.UpdateManager import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUItems import com.google.gson.GsonBuilder import com.google.gson.TypeAdapter @@ -65,6 +66,15 @@ class ConfigManager { return NEUItems.loadNBTData(reader.nextString()) } }.nullSafe()) + .registerTypeAdapter(NEUInternalName::class.java, object : TypeAdapter<NEUInternalName>() { + override fun write(out: JsonWriter, value: NEUInternalName) { + out.value(value.asString()) + } + + override fun read(reader: JsonReader): NEUInternalName { + return NEUInternalName.from(reader.nextString()) + } + }.nullSafe()) .enableComplexMapKeySerialization() .create() } |