Modded registry factories

- Modded platform gets registry access from the modded server factory
- Engine bootstrap and tile parity test get tile readers from the modded server factory
- Registry access tests build through the modded server factory
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-29 01:12:16 -04:00
1 parent d6226240a0
commit 08ffb96680
4 files changed
+7 -9

No files matched your search

@@ -391,7 +391,7 @@ public final class ModdedEngineBootstrap {
BlockDataMergeSupport.StateMerger previousMerger = BlockDataMergeSupport.bindPlatformMerger(new NativeStateMerger(ModdedBlockResolution.BLOCKS)::merge);
rollback.add(() -> BlockDataMergeSupport.restorePlatformMerger(previousMerger));
NativeTileReader nativeTileReader = NativeTileReader.forServer(boundLoader::currentServer);
NativeTileReader nativeTileReader = NativeModdedServer.tileReader(boundLoader::currentServer);
TileData.TileReader previousTileReader = TileData.bindPlatformReader(in -> ModdedTileData.wrap(nativeTileReader.read(in)));
rollback.add(() -> TileData.restorePlatformReader(previousTileReader));
@@ -20,7 +20,6 @@ package art.arcane.iris.modded;
import art.arcane.volmlib.nativelib.minecraft26_2.modded.NativeModdedServer;
import art.arcane.volmlib.nativelib.minecraft26_2.modded.NativeRegistryAccess;
import art.arcane.volmlib.nativelib.minecraft26_2.terrain.NativeRegistryDefinitions;
import art.arcane.volmlib.nativelib.minecraft26_2.modded.NativeEntitySpawns;
import art.arcane.volmlib.nativelib.minecraft26_2.modded.NativeModdedLoader;
@@ -61,9 +60,7 @@ public final class ModdedPlatform implements IrisPlatform {
public ModdedPlatform(NativeModdedLoader loader) {
this.loader = loader;
this.registries = new ModdedRegistries(
new NativeRegistryAccess(new NativeRegistryAccess.Configuration(
ModdedEngineBootstrap::currentServer,
ModdedRegistries::warnNotReady)),
NativeModdedServer.registryAccess(ModdedEngineBootstrap::currentServer, ModdedRegistries::warnNotReady),
ModdedPlatform::generationRegistry);
this.scheduler = new ModdedScheduler();
this.structureHooks = new ModdedStructureHooks(ModdedEngineBootstrap::currentServer);