Skip to content

Commit

Permalink
Bugfix time!
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jun 24, 2024
1 parent 52fbdab commit 42b783a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
- Fixed being kicked from the server when opening the creative inventory while holding a complicated scroll.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/enjarai/trickster/spell/SpellPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
import java.util.stream.Collectors;

public final class SpellPart implements Fragment {
public static final Codec<SpellPart> CODEC = Codec.recursive("spell_part", self -> RecordCodecBuilder.create(instance -> instance.group(
public static final MapCodec<SpellPart> 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.<Either<SpellPart, Boolean>>map(Either::left).orElse(Either.right(false)))
.listOf().fieldOf("sub_parts").forGetter(SpellPart::getSubParts)
).apply(instance, SpellPart::new)));
public static final MapCodec<SpellPart> MAP_CODEC = MapCodec.assumeMapUnsafe(CODEC);
public static final Codec<SpellPart> CODEC = MAP_CODEC.codec();
public static final Endec<SpellPart> ENDEC = CodecUtils.toEndec(CODEC);

public Fragment glyph;
Expand Down

0 comments on commit 42b783a

Please sign in to comment.