From 4a1e4c32691ba641338df32d7fe782823ccd11d1 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 20 Jul 2023 22:38:21 +1000 Subject: [PATCH] added registry for ContinuationFrame types! --- .../api/casting/eval/vm/ContinuationFrame.kt | 78 ++++++++++++------- .../api/casting/eval/vm/FrameEvaluate.kt | 22 +++++- .../api/casting/eval/vm/FrameFinishEval.kt | 12 ++- .../api/casting/eval/vm/FrameForEach.kt | 29 ++++++- .../api/casting/eval/vm/SpellContinuation.kt | 2 +- .../hexcasting/common/lib/HexRegistries.java | 2 + .../common/lib/hex/HexContinuationTypes.java | 49 ++++++++++++ .../hexcasting/xplat/IXplatAbstractions.java | 2 + .../hexcasting/fabric/FabricHexInitializer.kt | 1 + .../fabric/xplat/FabricXplatImpl.java | 14 ++++ .../hexcasting/forge/ForgeHexInitializer.java | 2 + .../forge/xplat/ForgeXplatImpl.java | 12 +++ 12 files changed, 193 insertions(+), 32 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexContinuationTypes.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt index 8cb2fcc5..4734b901 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt @@ -3,14 +3,12 @@ package at.petrak.hexcasting.api.casting.eval.vm import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.eval.CastResult import at.petrak.hexcasting.api.casting.iota.Iota -import at.petrak.hexcasting.api.utils.getList -import at.petrak.hexcasting.api.utils.hasList -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes +import at.petrak.hexcasting.common.lib.hex.HexContinuationTypes import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.Tag +import net.minecraft.resources.ResourceLocation import net.minecraft.server.level.ServerLevel -// TODO this should probably be a registry too /** * A single frame of evaluation during the execution of a spell. * @@ -49,34 +47,62 @@ sealed interface ContinuationFrame { */ fun size(): Int + val type: Type<*> + + interface Type { + fun deserializeFromNBT(tag: CompoundTag, world: ServerLevel): U? + } + companion object { + /** + * Takes a tag containing the ContinuationFrame.Type resourcelocation and the serialized continuation frame, and returns + * the deserialized continuation frame. + */ @JvmStatic fun fromNBT(tag: CompoundTag, world: ServerLevel): ContinuationFrame { - return when (tag.getString("type")) { - "evaluate" -> FrameEvaluate( - HexIotaTypes.LIST.deserialize( - tag.getList("patterns", Tag.TAG_COMPOUND), - world - )!!.list, - tag.getBoolean("isMetacasting") - ) + val type = getTypeFromTag(tag) ?: return FrameEvaluate(SpellList.LList(0, listOf()), false) - "end" -> FrameFinishEval - "foreach" -> FrameForEach( - HexIotaTypes.LIST.deserialize(tag.getList("data", Tag.TAG_COMPOUND), world)!!.list, - HexIotaTypes.LIST.deserialize(tag.getList("code", Tag.TAG_COMPOUND), world)!!.list, - if (tag.hasList("base", Tag.TAG_COMPOUND)) - HexIotaTypes.LIST.deserialize(tag.getList("base", Tag.TAG_COMPOUND), world)!!.list.toList() - else - null, - HexIotaTypes.LIST.deserialize( - tag.getList("accumulator", Tag.TAG_COMPOUND), - world - )!!.list.toMutableList() - ) + return (tag.get(HexContinuationTypes.KEY_DATA) as? CompoundTag)?.let { type.deserializeFromNBT(it, world) } + ?: FrameEvaluate(SpellList.LList(0, listOf()), false) + } - else -> FrameEvaluate(SpellList.LList(0, listOf()), false) + /** + * Takes a continuation frame and serializes it along with its type. + */ + @JvmStatic + fun toNBT(frame: ContinuationFrame): CompoundTag { + val type = frame.type + val typeId = HexContinuationTypes.REGISTRY.getKey(type) + ?: throw IllegalStateException( + "Tried to serialize an unregistered continuation type. Continuation: " + frame + + " ; Type" + type.javaClass.typeName) + + val data = frame.serializeToNBT() + + val out = CompoundTag() + out.putString(HexContinuationTypes.KEY_TYPE, typeId.toString()) + out.put(HexContinuationTypes.KEY_DATA, data) + return out + } + + /** + * This method attempts to find the type from the `type` key. + * See [ContinuationFrame.serializeToNBT] for the storage format. + * + * @return `null` if it cannot get the type. + */ + private fun getTypeFromTag(tag: CompoundTag): Type<*>? { + if (!tag.contains(HexContinuationTypes.KEY_TYPE, Tag.TAG_STRING.toInt())) { + return null } + + val typeKey = tag.getString(HexContinuationTypes.KEY_TYPE) + if (!ResourceLocation.isValidResourceLocation(typeKey)) { + return null + } + + val typeLoc = ResourceLocation(typeKey) + return HexContinuationTypes.REGISTRY[typeLoc] } } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt index bfd1de65..141148df 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt @@ -6,8 +6,12 @@ import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.iota.ListIota import at.petrak.hexcasting.api.utils.NBTBuilder +import at.petrak.hexcasting.api.utils.getList import at.petrak.hexcasting.api.utils.serializeToNBT import at.petrak.hexcasting.common.lib.hex.HexEvalSounds +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes +import net.minecraft.nbt.CompoundTag +import net.minecraft.nbt.Tag import net.minecraft.server.level.ServerLevel /** @@ -45,10 +49,26 @@ data class FrameEvaluate(val list: SpellList, val isMetacasting: Boolean) : Cont } override fun serializeToNBT() = NBTBuilder { - "type" %= "evaluate" "patterns" %= list.serializeToNBT() "isMetacasting" %= isMetacasting } override fun size() = list.size() + + override val type: ContinuationFrame.Type<*> = TYPE + + companion object { + @JvmField + val TYPE: ContinuationFrame.Type = object : ContinuationFrame.Type { + override fun deserializeFromNBT(tag: CompoundTag, world: ServerLevel): FrameEvaluate { + return FrameEvaluate( + HexIotaTypes.LIST.deserialize( + tag.getList("patterns", Tag.TAG_COMPOUND), + world + )!!.list, + tag.getBoolean("isMetacasting")) + } + + } + } } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt index 1f4db9a0..72bbb8c8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt @@ -6,6 +6,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.iota.NullIota import at.petrak.hexcasting.api.utils.NBTBuilder import at.petrak.hexcasting.common.lib.hex.HexEvalSounds +import net.minecraft.nbt.CompoundTag import net.minecraft.server.level.ServerLevel /** @@ -32,9 +33,14 @@ object FrameFinishEval : ContinuationFrame { ) } - override fun serializeToNBT() = NBTBuilder { - "type" %= "end" - } + override fun serializeToNBT() = CompoundTag() override fun size() = 0 + + @JvmField + val TYPE: ContinuationFrame.Type = object : ContinuationFrame.Type { + override fun deserializeFromNBT(tag: CompoundTag, world: ServerLevel) = FrameFinishEval + } + + override val type = TYPE } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt index 56a627f6..ec587cb7 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt @@ -6,8 +6,13 @@ import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.iota.ListIota import at.petrak.hexcasting.api.utils.NBTBuilder +import at.petrak.hexcasting.api.utils.getList +import at.petrak.hexcasting.api.utils.hasList import at.petrak.hexcasting.api.utils.serializeToNBT import at.petrak.hexcasting.common.lib.hex.HexEvalSounds +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes +import net.minecraft.nbt.CompoundTag +import net.minecraft.nbt.Tag import net.minecraft.server.level.ServerLevel /** @@ -76,7 +81,6 @@ data class FrameForEach( } override fun serializeToNBT() = NBTBuilder { - "type" %= "foreach" "data" %= data.serializeToNBT() "code" %= code.serializeToNBT() if (baseStack != null) @@ -85,4 +89,27 @@ data class FrameForEach( } override fun size() = data.size() + code.size() + acc.size + (baseStack?.size ?: 0) + + override val type: ContinuationFrame.Type<*> = TYPE + + companion object { + @JvmField + val TYPE: ContinuationFrame.Type = object : ContinuationFrame.Type { + override fun deserializeFromNBT(tag: CompoundTag, world: ServerLevel): FrameForEach { + return FrameForEach( + HexIotaTypes.LIST.deserialize(tag.getList("data", Tag.TAG_COMPOUND), world)!!.list, + HexIotaTypes.LIST.deserialize(tag.getList("code", Tag.TAG_COMPOUND), world)!!.list, + if (tag.hasList("base", Tag.TAG_COMPOUND)) + HexIotaTypes.LIST.deserialize(tag.getList("base", Tag.TAG_COMPOUND), world)!!.list.toList() + else + null, + HexIotaTypes.LIST.deserialize( + tag.getList("accumulator", Tag.TAG_COMPOUND), + world + )!!.list.toMutableList() + ) + } + + } + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/SpellContinuation.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/SpellContinuation.kt index 4efb9c4a..ec706c28 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/SpellContinuation.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/SpellContinuation.kt @@ -23,7 +23,7 @@ sealed interface SpellContinuation { var self = this val frames = mutableListOf() while (self is NotDone) { - frames.add(self.frame.serializeToNBT()) + frames.add(ContinuationFrame.toNBT(self.frame)) self = self.next } return frames diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexRegistries.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexRegistries.java index 73681d8c..e529e9b8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexRegistries.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexRegistries.java @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; +import at.petrak.hexcasting.api.casting.eval.vm.ContinuationFrame; import at.petrak.hexcasting.api.casting.iota.IotaType; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceKey; @@ -15,5 +16,6 @@ public class HexRegistries { public static final ResourceKey>> SPECIAL_HANDLER = ResourceKey.createRegistryKey(modLoc("special_handler")); public static final ResourceKey>> IOTA_TYPE = ResourceKey.createRegistryKey(modLoc("iota_type")); public static final ResourceKey> ARITHMETIC = ResourceKey.createRegistryKey(modLoc("arithmetic")); + public static final ResourceKey>> CONTINUATION_TYPE = ResourceKey.createRegistryKey(modLoc("continuation_type")); public static final ResourceKey> EVAL_SOUND = ResourceKey.createRegistryKey(modLoc("eval_sound")); } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexContinuationTypes.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexContinuationTypes.java new file mode 100644 index 00000000..5ec1d821 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexContinuationTypes.java @@ -0,0 +1,49 @@ +package at.petrak.hexcasting.common.lib.hex; + +import at.petrak.hexcasting.api.HexAPI; +import at.petrak.hexcasting.api.casting.eval.vm.ContinuationFrame; +import at.petrak.hexcasting.api.casting.eval.vm.FrameEvaluate; +import at.petrak.hexcasting.api.casting.eval.vm.FrameFinishEval; +import at.petrak.hexcasting.api.casting.eval.vm.FrameForEach; +import at.petrak.hexcasting.xplat.IXplatAbstractions; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; + +import javax.annotation.ParametersAreNonnullByDefault; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.BiConsumer; + +import static at.petrak.hexcasting.api.HexAPI.modLoc; + +/** + * Stores the registry for continuation frame types, some utility methods, and all the types Hexcasting itself defines. + */ +@ParametersAreNonnullByDefault +public class HexContinuationTypes { + public static final Registry> REGISTRY = IXplatAbstractions.INSTANCE.getContinuationTypeRegistry(); + + public static final String + KEY_TYPE = HexAPI.MOD_ID + ":type", + KEY_DATA = HexAPI.MOD_ID + ":data"; + + public static void registerContinuations(BiConsumer, ResourceLocation> r) { + for (var e : CONTINUATIONS.entrySet()) { + r.accept(e.getValue(), e.getKey()); + } + } + + private static final Map> CONTINUATIONS = new LinkedHashMap<>(); + + public static final ContinuationFrame.Type EVALUATE = continuation("evaluate", FrameEvaluate.TYPE); + public static final ContinuationFrame.Type FOREACH = continuation("foreach", FrameForEach.TYPE); + public static final ContinuationFrame.Type END = continuation("end", FrameFinishEval.TYPE); + + private static > T continuation(String name, T continuation) { + var old = CONTINUATIONS.put(modLoc(name), continuation); + if (old != null) { + throw new IllegalArgumentException("Typo? Duplicate id " + name); + } + return continuation; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java index e160afbc..86dbc245 100644 --- a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java +++ b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java @@ -12,6 +12,7 @@ import at.petrak.hexcasting.api.casting.eval.ResolvedPattern; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; import at.petrak.hexcasting.api.casting.eval.vm.CastingImage; import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; +import at.petrak.hexcasting.api.casting.eval.vm.ContinuationFrame; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.pigment.ColorProvider; import at.petrak.hexcasting.api.pigment.FrozenPigment; @@ -175,6 +176,7 @@ public interface IXplatAbstractions { Registry> getIotaTypeRegistry(); Registry getArithmeticRegistry(); + Registry> getContinuationTypeRegistry(); Registry getEvalSoundRegistry(); diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt index 439b6cda..8cc7a00f 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt @@ -145,6 +145,7 @@ object FabricHexInitializer : ModInitializer { HexActions.register(bind(IXplatAbstractions.INSTANCE.actionRegistry)) HexSpecialHandlers.register(bind(IXplatAbstractions.INSTANCE.specialHandlerRegistry)) HexArithmetics.register(bind(IXplatAbstractions.INSTANCE.arithmeticRegistry)) + HexContinuationTypes.registerContinuations(bind(IXplatAbstractions.INSTANCE.continuationTypeRegistry)) HexEvalSounds.register(bind(IXplatAbstractions.INSTANCE.evalSoundRegistry)) // Because of Java's lazy-loading of classes, can't use Kotlin static initialization for diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java index cfce2d85..da6a4439 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java @@ -12,6 +12,7 @@ import at.petrak.hexcasting.api.casting.eval.ResolvedPattern; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; import at.petrak.hexcasting.api.casting.eval.vm.CastingImage; import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; +import at.petrak.hexcasting.api.casting.eval.vm.ContinuationFrame; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.api.mod.HexTags; @@ -435,6 +436,14 @@ public class FabricXplatImpl implements IXplatAbstractions { Lifecycle.stable())) .buildAndRegister() ); + + private static final Supplier>> CONTINUATION_TYPE_REGISTRY = Suppliers.memoize(() -> + FabricRegistryBuilder.from(new DefaultedMappedRegistry<>( + HexAPI.MOD_ID + ":end", HexRegistries.CONTINUATION_TYPE, + Lifecycle.stable(), false)) + .buildAndRegister() + ); + private static final Supplier> EVAL_SOUNDS_REGISTRY = Suppliers.memoize(() -> FabricRegistryBuilder.from(new DefaultedMappedRegistry<>( HexAPI.MOD_ID + ":nothing", HexRegistries.EVAL_SOUND, @@ -462,6 +471,11 @@ public class FabricXplatImpl implements IXplatAbstractions { return ARITHMETIC_REGISTRY.get(); } + @Override + public Registry> getContinuationTypeRegistry() { + return CONTINUATION_TYPE_REGISTRY.get(); + } + @Override public Registry getEvalSoundRegistry() { return EVAL_SOUNDS_REGISTRY.get(); diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java index f4030e2f..8fa6affe 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java @@ -106,6 +106,7 @@ public class ForgeHexInitializer { IXplatAbstractions.INSTANCE.getSpecialHandlerRegistry(); IXplatAbstractions.INSTANCE.getIotaTypeRegistry(); IXplatAbstractions.INSTANCE.getArithmeticRegistry(); + IXplatAbstractions.INSTANCE.getContinuationTypeRegistry(); IXplatAbstractions.INSTANCE.getEvalSoundRegistry(); rootRegistry.freeze(); @@ -138,6 +139,7 @@ public class ForgeHexInitializer { bind(HexRegistries.ACTION, HexActions::register); bind(HexRegistries.SPECIAL_HANDLER, HexSpecialHandlers::register); bind(HexRegistries.ARITHMETIC, HexArithmetics::register); + bind(HexRegistries.CONTINUATION_TYPE, HexContinuationTypes::registerContinuations); bind(HexRegistries.EVAL_SOUND, HexEvalSounds::register); ForgeHexArgumentTypeRegistry.ARGUMENT_TYPES.register(getModEventBus()); diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java index 8514b7ae..91070dd4 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java @@ -12,6 +12,7 @@ import at.petrak.hexcasting.api.casting.eval.env.StaffCastEnv; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; import at.petrak.hexcasting.api.casting.eval.vm.CastingImage; import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; +import at.petrak.hexcasting.api.casting.eval.vm.ContinuationFrame; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.mod.HexTags; import at.petrak.hexcasting.api.pigment.ColorProvider; @@ -21,6 +22,7 @@ import at.petrak.hexcasting.api.player.FlightAbility; import at.petrak.hexcasting.api.player.Sentinel; import at.petrak.hexcasting.api.utils.HexUtils; import at.petrak.hexcasting.common.lib.HexRegistries; +import at.petrak.hexcasting.common.lib.hex.HexContinuationTypes; import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import at.petrak.hexcasting.common.msgs.IMessage; @@ -479,6 +481,11 @@ public class ForgeXplatImpl implements IXplatAbstractions { ForgeAccessorBuiltInRegistries.hex$registerSimple( HexRegistries.ARITHMETIC, null) ); + private static final Supplier>> CONTINUATION_TYPE_REGISTRY = Suppliers.memoize(() -> + ForgeAccessorBuiltInRegistries.hex$registerDefaulted( + HexRegistries.CONTINUATION_TYPE, + modLoc("end").toString(), registry -> HexContinuationTypes.END) + ); private static final Supplier> EVAL_SOUND_REGISTRY = Suppliers.memoize(() -> ForgeAccessorBuiltInRegistries.hex$registerDefaulted( HexRegistries.EVAL_SOUND, @@ -505,6 +512,11 @@ public class ForgeXplatImpl implements IXplatAbstractions { return ARITHMETIC_REGISTRY.get(); } + @Override + public Registry> getContinuationTypeRegistry() { + return CONTINUATION_TYPE_REGISTRY.get(); + } + @Override public Registry getEvalSoundRegistry() { return EVAL_SOUND_REGISTRY.get();