From 42b783aae559da517ca7f2f987126fa33ccfb09f Mon Sep 17 00:00:00 2001 From: enjarai Date: Mon, 24 Jun 2024 16:00:36 +0200 Subject: [PATCH] Bugfix time! --- CHANGELOG.md | 4 +--- gradle.properties | 2 +- src/main/java/dev/enjarai/trickster/spell/SpellPart.java | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c285f3fe..f6362dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1 @@ -- Added conjure water and conjure flower tricks. -- Fixed missing entries in creative inventory. -- Added a check for adventure mode to prevent block editing. \ No newline at end of file +- Fixed being kicked from the server when opening the creative inventory while holding a complicated scroll. \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index b368bdb5..35c2e183 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ deps.yarn=1.21+build.2 loader_version=0.15.11 # Mod Properties -mod_version=1.0.2 +mod_version=1.0.3 maven_group=dev.enjarai.trickster archives_base_name=trickster diff --git a/src/main/java/dev/enjarai/trickster/spell/SpellPart.java b/src/main/java/dev/enjarai/trickster/spell/SpellPart.java index a6e85bb4..42348897 100644 --- a/src/main/java/dev/enjarai/trickster/spell/SpellPart.java +++ b/src/main/java/dev/enjarai/trickster/spell/SpellPart.java @@ -20,13 +20,13 @@ import java.util.stream.Collectors; public final class SpellPart implements Fragment { - public static final Codec CODEC = Codec.recursive("spell_part", self -> RecordCodecBuilder.create(instance -> instance.group( + public static final MapCodec MAP_CODEC = MapCodec.recursive("spell_part", self -> RecordCodecBuilder.mapCodec(instance -> instance.group( Fragment.CODEC.get().fieldOf("glyph").forGetter(SpellPart::getGlyph), Codec.either(self, Codec.BOOL) .xmap(e -> e.left(), o -> o.>map(Either::left).orElse(Either.right(false))) .listOf().fieldOf("sub_parts").forGetter(SpellPart::getSubParts) ).apply(instance, SpellPart::new))); - public static final MapCodec MAP_CODEC = MapCodec.assumeMapUnsafe(CODEC); + public static final Codec CODEC = MAP_CODEC.codec(); public static final Endec ENDEC = CodecUtils.toEndec(CODEC); public Fragment glyph;