From 0a3d1faf775e8d217bb13b5f9a0f64899c4cb9b1 Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Sat, 1 Jun 2024 14:53:40 +0100 Subject: [PATCH] Update to 1.21 --- gradle.properties | 10 +++++----- src/main/kotlin/dev/andante/codex/Codex.kt | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 748cd24..c409e51 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,11 +4,11 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.5-rc2 -yarn_build=1 -loader_version=0.15.10 -fabric_kotlin_version=1.10.19+kotlin.1.9.23 +minecraft_version=1.21-pre2 +yarn_build=2 +loader_version=0.15.11 +fabric_kotlin_version=1.10.20+kotlin.1.9.24 # Mod Properties -mod_version=1.5.0 +mod_version=1.6.0 maven_group=dev.andante diff --git a/src/main/kotlin/dev/andante/codex/Codex.kt b/src/main/kotlin/dev/andante/codex/Codex.kt index 6897128..405362f 100644 --- a/src/main/kotlin/dev/andante/codex/Codex.kt +++ b/src/main/kotlin/dev/andante/codex/Codex.kt @@ -1,6 +1,5 @@ package dev.andante.codex -import com.mojang.datafixers.util.Pair import com.mojang.serialization.Codec import com.mojang.serialization.Decoder import com.mojang.serialization.DynamicOps @@ -38,8 +37,7 @@ fun Encoder.encodeQuick(ops: DynamicOps, input: A): T? { * Decodes from a dynamic ops format. */ fun Decoder.decodeQuick(ops: DynamicOps, input: T): A? { - return decode(ops, input) + return parse(ops, input) .result() - .map(Pair::getFirst) .orElse(null) }