aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-04 15:42:55 +0200
committernea <nea@nea.moe>2023-05-04 15:43:18 +0200
commit4053a2995e845b48fdaf584f7a6787cd1e4dd4bc (patch)
tree5d8c925ef613e58c7449477458e21ebb00a9361e /src/main
parentbcd86e28228d2ee35a2009d4f7e2fea55ea3c02f (diff)
downloadfirmament-4053a2995e845b48fdaf584f7a6787cd1e4dd4bc.tar.gz
firmament-4053a2995e845b48fdaf584f7a6787cd1e4dd4bc.tar.bz2
firmament-4053a2995e845b48fdaf584f7a6787cd1e4dd4bc.zip
Dynamic save version id
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt4
-rw-r--r--src/main/resources/notenoughupdates.mixins.json34
2 files changed, 20 insertions, 18 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt b/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt
index cf2fc21..f243cfe 100644
--- a/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt
+++ b/src/main/kotlin/moe/nea/notenoughupdates/repo/ItemCache.kt
@@ -12,6 +12,7 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.launch
import kotlin.io.path.absolutePathString
import kotlin.io.path.writer
+import net.minecraft.SharedConstants
import net.minecraft.client.resource.language.I18n
import net.minecraft.datafixer.Schemas
import net.minecraft.datafixer.TypeReferences
@@ -22,6 +23,7 @@ import net.minecraft.nbt.NbtOps
import net.minecraft.text.Text
import net.minecraft.util.Identifier
import moe.nea.notenoughupdates.NotEnoughUpdates
+import moe.nea.notenoughupdates.mixins.accessor.AccessorDataFixTypes
import moe.nea.notenoughupdates.util.LegacyTagParser
import moe.nea.notenoughupdates.util.appendLore
@@ -46,7 +48,7 @@ object ItemCache : IReloadable {
TypeReferences.ITEM_STACK,
Dynamic(NbtOps.INSTANCE, this),
-1,
- 2975
+ SharedConstants.getGameVersion().saveVersion.id
).value as NbtCompound
} catch (e: Exception) {
if (isFlawless)
diff --git a/src/main/resources/notenoughupdates.mixins.json b/src/main/resources/notenoughupdates.mixins.json
index eff6a22..ce2317a 100644
--- a/src/main/resources/notenoughupdates.mixins.json
+++ b/src/main/resources/notenoughupdates.mixins.json
@@ -1,20 +1,20 @@
{
- "required": true,
- "plugin": "moe.nea.notenoughupdates.init.MixinPlugin",
- "package": "moe.nea.notenoughupdates.mixins",
- "compatibilityLevel": "JAVA_16",
- "client": [
- "MixinDownloadingTerrainScreen",
- "MixinMessageHandler",
- "MixinMinecraft",
- "MixinWorldRenderer",
- "accessor.AccessorHandledScreen",
- "devenv.DisableCommonPacketWarnings"
- ],
- "mixins": [
- "devenv.DisableInvalidFishingHook"
- ],
- "injectors": {
- "defaultRequire": 1
+ "required": true,
+ "plugin": "moe.nea.notenoughupdates.init.MixinPlugin",
+ "package": "moe.nea.notenoughupdates.mixins",
+ "compatibilityLevel": "JAVA_16",
+ "client": [
+ "MixinDownloadingTerrainScreen",
+ "MixinMessageHandler",
+ "MixinMinecraft",
+ "MixinWorldRenderer",
+ "accessor.AccessorHandledScreen",
+ "devenv.DisableCommonPacketWarnings"
+ ],
+ "mixins": [
+ "devenv.DisableInvalidFishingHook"
+ ],
+ "injectors": {
+ "defaultRequire": 1
}
}