Skip to content

Commit

Permalink
Eee?
Browse files Browse the repository at this point in the history
  • Loading branch information
StellarWitch7 committed Nov 4, 2024
1 parent dd1f898 commit 28d635d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/stellarwitch7/ram/spell/mind/RAMSlot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stellarwitch7.ram.spell.mind
import com.mojang.serialization.Codec
import com.mojang.serialization.codecs.RecordCodecBuilder
import dev.enjarai.trickster.spell.Fragment
import io.wispforest.accessories.endec.CodecUtils
import dev.enjarai.trickster.EndecTomfoolery

/**
* Represents a single slot within a Random Access Mind (RAM).
Expand All @@ -15,6 +15,6 @@ class RAMSlot(var free: Boolean, var value: Fragment) { }
object RAMSlot {
val codec: Codec[RAMSlot] = RecordCodecBuilder.create(builder => builder.group(
Codec.BOOL.fieldOf("free").forGetter(_.free),
CodecUtils.ofEndec(Fragment.ENDEC).fieldOf("value").forGetter(_.value)
EndecTomfoolery.toCodec(Fragment.ENDEC).fieldOf("value").forGetter(_.value)
).apply(builder, RAMSlot(_, _)))
}

0 comments on commit 28d635d

Please sign in to comment.