Research round for "Next big steps" 6 in java-bridge-boss.md, 2026-11-04
(bridge-112-research). Nothing here runs yet. Read java-bridge.md first: this
plan reuses its shape (a mirror of Horizon's world on the Java side, Horizon stays the game).
- Yes, Cleanroom can be the bridge's 1.12 side. It is a maintained Forge 1.12.2 fork that runs on Java 25 (the bridge's own runtime), with LWJGL 3.4.3 + SDL 3, built-in Mixin, and Fugue for old-mod quirks. 0.7.14-alpha came out 2026-10-28; it is alpha, so pin a version. SkyFactory 4 has a published Cleanroom migration (a few mods swapped, see below).
- One process, one Java side per world. JNI allows one JVM per process, so 1.12 runs in the
same JVM as the 26.3 bridge. A world uses either Fabric 26.3 (Knot) or Forge 1.12 (Cleanroom's
Foundation class loader), never both at once (two
net.minecrafttrees, two LWJGLs, two log4j set-ups: not worth fighting). - Same design as the Fabric bridge, with three new pieces. (1) Block, item and NBT translation
between 1.12 (numeric ids + 4-bit metadata) and 26.3 states. Horizon already ports vanilla's
flattening tables (
horizon-world/src/datafix/), so the vanilla half exists. (2) The 1.12 client draws with raw OpenGL, not a GPU API we can swap out the way we swap 26.3's renderpearl. So it gets a real hidden GL context: screens are drawn there and read back, block models are exported as quads, and in-world renderers are recorded. (3) Forge's event bus, not Mixins, is what mods use to change vanilla's behaviour. Horizon fires Forge events where it already fires Fabric ones. - Rough size: bigger than the Fabric bridge's first month. The first visible milestone is "a 1.12 mod's block placed in Horizon", reachable in 2–3 worker rounds (phases 1–2 below).
SkyFactory 4.2.4's server pack (CurseForge file 3565687: 202 jars, 201 mods, 48k classes; the
client-only mods such as JourneyMap aren't in it), read with tools/java_bridge/scan112.py. The
script reads class files only. It resolves superclasses through every jar and counts
@SubscribeEvent handlers by event type. Run it on the user's full client instance for the
client-only mods:
python3 -I tools/java_bridge/scan112.py ~/path/to/SkyFactory4/mods --tsv /tmp/sf4.tsv| Need | Count | Who |
|---|---|---|
| Block classes / item classes | 1406 / 873 (107 / 97 mods) | everything |
| Tile entities (ticking) | 1106 (841) in 88 mods | NuclearCraft 151, Mekanism 84, Cyclic 74, Industrial Foregoing 67, Thermal Dynamics 47, AE2 45, Astral Sorcery 41 |
| Container GUIs / other screens | 679 / 172 in 70 / 56 mods | Mekanism 85, NuclearCraft 57, Cyclic 52, ViesCraft 48, PL2 43, AE2 42 |
| Forge event handlers | 2692 in 184 mods, 362 event types | see the event table |
| Capability use: items / fluids / energy (FE) | 340 / 222 / 155 refs, 74 / 49 / 39 mods; 57 own capabilities in 32 mods | pipes, machines, AE2, Mekanism |
Network messages (IMessage) |
687 in 91 mods (SimpleNetworkWrapper in 84) |
every machine GUI |
Blockstate files (Forge forge_marker format) |
2724 (1609) in 93 mods | 73 mods use Forge's format |
Custom IBakedModels / OBJ+B3D files |
219 in 48 mods / 104 files in 13 mods | BiblioCraft 44, AE2 24 (cables), OpenComputers, Chisels & Bits, CTM |
| Tile entity renderers (TESR) | 293 in 61 mods | Mekanism 26, Cyclic 22, BiblioCraft 22 |
Direct GL calls (GL11) / GlStateManager / Tessellator |
385 / 1446 / 366 refs | Astral Sorcery 57, BiblioCraft 43; GL shaders in 5 mods |
| Mobs / other entities | 94 / 127 classes | Twilight Forest 56 mobs |
| Dimensions / chunk generators / world types | 10 / 10 / 5 | Topography, Sky Grid, Lost Cities, Twilight Forest, Compact Machines, Hunting Dimension, Mystcraft |
IWorldGenerator (ore and plant gen) |
32 in 20 mods | Tinkers, NuclearCraft, AE2, Mekanism, Sky Orchards |
| Coremods (ASM transformers) / Mixin configs | 15 mods (57 transformers) / 2 mods | BnBGamingCore 25 (Topography's hooks), Apotheosis 8, MalisisCore 8, Aroma1997Core 6; Surge and FoamFix go on Cleanroom |
Custom IRecipe classes; CraftTweaker scripts |
71 in 26 mods; 136 .zs files |
ContentTweaker, RecipeStages, Extended Crafting |
The world SF4 makes. server.properties: level-type=DEFAULT,
generator-settings={"Topography-Preset":"Sky Factory 4"}. The default preset
(config/topography/SF4/dirt_tree.txt) is a void world with a spawn structure
(structures/*.nbt, 1.12 structure templates), a skybox renderer and fog colours. Other presets:
cages, oceans of Thermal fluids, Lost Cities, Hunting Dimension, the Nether/End as void. So the
overworld is almost free (void + one template). The hard dimensions are Twilight Forest, Compact
Machines' rooms, Mystcraft ages and Lost Cities.
Progression that must work: Sky Orchards' resource trees (saplings: random ticks of mod blocks), Prestige + GameStages + RecipeStages/ItemStages/MobStages/DimensionStages (per-player gating: crafting must ask Java), advancements (Prestige points come from them; Triumph adds more), Forgiving Void (fall into the void → back on top), CraftTweaker's recipe changes, and InControl's spawn rules.
| Event | Handlers | Where Horizon fires it (the Fabric bridge's hook) |
|---|---|---|
RegistryEvent.Register, ModelRegistryEvent, ModelBakeEvent, TextureStitchEvent.Pre, ColorHandlerEvent |
374/112, 119/80, 50/34, 39/33, 29 | Java's own boot: free |
ConfigChangedEvent, ClientTickEvent, RenderTickEvent |
78, 87/51, 23 | Java's client: free |
PlayerLoggedIn/OutEvent, PlayerChangedDimensionEvent, PlayerEvent.Clone |
65+23, 24, 16 | join/leave, server_travel, respawn |
PlayerInteractEvent.RightClickBlock / LeftClickBlock / EntityInteract |
54/32, 27/18, 22/14 | use_hand (routed use), dig start, java_entity_interact |
TickEvent.PlayerTickEvent, LivingUpdateEvent |
48/36, 43/22 | each mirrored player each tick (Forgiving Void, Iron Jetpacks, Wall-Jump) |
AttachCapabilitiesEvent |
46/30 | Java side; also on copies of Horizon's chests and players |
EntityJoinWorldEvent, LivingSpawnEvent |
45/33 | Horizon's spawns ask (InControl) |
LivingHurtEvent, LivingAttackEvent, LivingDeathEvent, LivingDropsEvent |
43, 19, 31, 27 | combat on mob copies (HorizonCombat pattern) |
BlockEvent.BreakEvent, HarvestDropsEvent, PlayerEvent.BreakSpeed |
32, 30, 18 | java_break (routed break), mining speed |
RenderWorldLastEvent, RenderGameOverlayEvent.Post, DrawBlockHighlightEvent |
39, 28, 23 | the client's frame (see Drawing) |
ItemTooltipEvent, GuiOpenEvent, KeyInputEvent, MouseEvent |
46, 23, 24, 17 | Horizon's tooltips ask; keys forwarded |
WorldEvent.Load/Unload/Save, ServerTickEvent, WorldTickEvent |
38/47/16, 37, 22 | the mirror's levels and tick |
LootTableLoadEvent, ItemCraftedEvent, EntityItemPickupEvent |
18, 16, 14 | loot, crafting result, pickup |
Phase 1 status: Cleanroom boots hidden in the bridge's JVM (2026-11-05, bridge-112-boot)
Runs: Cleanroom 0.7.14-alpha (Forge 14.23.5.2864) boots inside the bridge's JVM from Rust
(horizon_jvm::boot112::start), hidden: SDL's offscreen driver gives a real GL context (Mesa
llvmpipe in the cloud), no window shows. Every mod loads (preInit, init, postInit, textures,
models), the main menu opens, then the platform mod keeps 1.12's client thread for Horizon and
returns a report: mods; every block with its stored states (the distinct
getStateFromMeta(0..15) with meta, light, opacity) and FML's number; every item with its
listed stacks (meta, translation key, client name, NBT), subtypes, max damage, stack size;
fluids; entities; biomes; dimensions. call(bridge, "ping") / "screenshot MOD PATH" run on
the client thread afterwards (a frame of the hidden client read back with glReadPixels).
| Run (2-core cloud box, llvmpipe) | Start | Heap after | Peak RSS | Blocks / stored states / all states | Items / listed stacks |
|---|---|---|---|---|---|
Fixture hello112 only |
8.1–8.6 s | 180–270 MB | – | 256 / – / – | 415 / – |
| SkyFactory 4.2.4 server pack + Cleanroom swaps (217 mods) | 89–100 s | 3.7–4.4 GB | 5.9 GB | 2951 / 17 612 / 165 638 | 4881 / 23 949 |
SF4's stored states are ~11% of its full state sets: the plan's "content blocks carry only stored
states" holds. FML's numbers: blocks up to 2950 (of 4096), items up to 8565. 504 fluids, 308
entities, 84 biomes, 8 dimensions (Compact Machines 144, Hunting Dimension 28885, Lost Cities 111,
AE2 storage cells 2, Twilight Forest 7). Two block states (of 17 612) throw in their own mod's
getMetaFromState: reported with error, not fatal.
Screenshots of the hidden client (SF4's own main menu with Thermal Foundation's item icons
drawn by 1.12's renderer; the fixture's items over vanilla's menu) were checked in the
bridge-112-boot chat.
Try it (Java 25 as JAVA_HOME/HORIZON_JAVA_HOME):
python3 -I tools/java_bridge/fetch112.py # Cleanroom + Mojang's 1.12.2 into ~/.cache/horizon-112 (~270 MB)
tools/java_bridge/build112.sh # first run: one boot to dump the compile jar (~1 min)
tools/java_bridge/run112.sh "" report.json shot.png # standalone: report + screenshot
cargo test -p horizon-jvm --test boot112 -- --nocapture # the same through Rust/JNI (passes without the cache)
GAME=~/sf4 XMX=4500M SHOT_MOD=thermalfoundation tools/java_bridge/run112.sh "" sf4.json sf4.png # a pack folderA pack folder for GAME=: its config/, scripts/, resources/, oresources/, fontfiles/
and mods/ with Cleanroom's swaps. SF4 4.2.4 as tested: dropped FastFurnace, FastWorkbench,
FoamFix, JEI, Mercurius, Forgelin, Surge, Toast Control, SmoothFont (see traps); added Had
Enough Items 4.37.3, Forgelin-Continuous 2.4.20.0, Fugue 0.25.5 (Modrinth), Scalar Legacy
1.0.1 (CurseForge 1235372: OpenComputers and the other Scala 2.11 mods crash without it).
Mekanism stayed the original 9.8.3 (it loads; Mekanism CE not needed to boot).
Files:
| Piece | Files |
|---|---|
| Rust | crates/horizon-jvm/src/boot112.rs (Cleanroom, launch, args, start, call), tests/boot112.rs |
| Boot (system class path, JDK types only) | java/dev/horizonlab/bridge/c112/Boot112.java (in the bridge jar: start runs Foundation on thread "Horizon 1.12", waits for the hand-over; call) |
Platform mod horizon112 |
java/platform112/mod/: Horizon112 (first client tick: hand-over, then runs Horizon's commands on the client thread forever), Report112, Screenshot112 |
Fixture hello112 |
java/platform112/fixture/: marble (3 stored states, item subtypes), lamp (light 15), gem (2 subtypes, own names), wand (damageable), goo (Forge fluid); models over vanilla textures |
| Dev tools | java/platform112/devdump/: ClassDumpAgent + DumpMod (the compile jar), Remap112 (SRG ↔ MCP) |
| Scripts | tools/java_bridge/fetch112.py, build112.sh, run112.sh; pins in research-lock.json → cleanroom |
How it boots. fetch112.py reads the pinned installer's own install_profile.json and
version.json (217 libraries; per-OS natives extracted; Cleanroom's universal jar; Mojang's
client jar, which FML patches in memory from binpatches.zip) and writes launch.json.
boot112::start puts the bridge jar + that class path on the JVM, sets SDL_VIDEO_DRIVER=offscreen
and ALSOFT_DRIVERS=null (unless set), copies the platform jar to
<game>/horizon-java-112/horizon112-platform.jar and passes --mods horizon-java-112/... (the
player's mods/ stays theirs), turns FML's splash off in config/splash.properties, and calls
Boot112.start(Foundation, args) (offline --username Horizon --accessToken 0, FML's client
tweaker). On the first ClientTickEvent the platform mod puts a Function<String,String> into
the SynchronousQueue Boot112 left in System.getProperties(), then loops on its task queue:
1.12's game loop never runs again; Horizon owns the client thread and its GL context.
How the platform code is compiled (no ForgeGradle). 1.12 runs with SRG member names
(func_176203_a) and FML deobfuscates Mojang's and Forge's classes at load time, so no jar on
disk has the names mods are compiled against. build112.sh boots once with ClassDumpAgent
(a -javaagent keeping every net/minecraft* class as FML defines it) while DumpMod loads all
of them; the dump (~4600 classes, SRG names) is renamed to MCP names with MCP's stable_39 CSVs
(Remap112 deobf). Platform and fixture code are written with MCP names like any 1.12 mod,
compiled with --release 8 against that jar, and renamed back to SRG (Remap112 reobf: each
member found through its owner's supertypes). Both jars stay in ~/.cache/horizon-112/<ver>/dev/:
they hold Mojang's code, never commit them.
- A mod class on the system class path never gets its events. The first dump mod sat in the
-javaagentjar (system class path):@Mod.EventHandlerand@SubscribeEventmethods were silently never called (its annotations resolve against the app loader's Forge classes, FML looks for Foundation's). Keep mod code out of the system class path;Boot112uses JDK types only and the hand-over crosses throughSystem.getProperties(). - Forge's universal jar names Mojang's classes obfuscated (
aow=Block): compiling against it fails. Compile against the runtime dump, which has Forge's classes as FML transforms them. - FML's splash waits for a click (
SplashProgress.confirm) when Fugue/Scalar are missing: the boot hangs forever.splash.properties enabled=false(also one GL thread fewer). - OpenAL can't open a device headless: 1.12 waits 30 s for its sound system, then goes
silent.
ALSOFT_DRIVERS=nullopens OpenAL Soft's null device at once. - LWJGL aborts the whole process on a GL call with no current context ("FATAL ERROR in native method … The JVM will abort"): SmoothFont rasterises fonts on its own thread, which relies on a context it doesn't have with the splash off. In Horizon that kills the game, not just 1.12: dropped from SF4 for now; later give such threads a shared context or catch them first.
- A crash report ends the process (FML exits after "Game crashed!", as with the missing Scala library). Phase 2 must stop 1.12's exits from taking Horizon down.
--modspaths are relative to the game folder; an absolute path is ignored silently ("Found mods from the command line:" with nothing after it).- Mods without
pack.mcmetaneeden_US.lang(FML's LegacyV2Adapter asks for the old name); withpack_format: 3,en_us.lang. The fixture has apack.mcmeta. - Memory: SF4 needs ~4.5 GB of heap;
-Xmx6G+ llvmpipe got the JVM OOM-killed on an 8 GB box. On the player's machine 1.12 shares Horizon's process, so its heap adds to Horizon's. - FML's version check calls out to the network at start (harmless; turn off later in
forge.cfg). - Cleanroom prints a big "Fugue and Scalar are not installed" warning with the fixture only:
harmless (
config/forge_early.cfgturns it off).
Next (phase 2, placed112): content conversion from this report (stored states → content
blocks, listed stacks → items, baked quads + the 1.12 atlas → models), the vanilla mapping both
ways, and a game-side switch (HORIZON_112=<install> like HORIZON_NEOFORGE) that starts
boot112 instead of Fabric; stop FML's exit on a crash first.
What it is: Cleanroom = CleanroomLoader (FML's continuation) + patched Minecraft + Forge, with
classes loaded by Foundation (a LaunchWrapper replacement: top.outlands.foundation.boot .Foundation.main with --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker or
FMLServerTweaker), LWJGL 3.4.3 with LWJGLY (the LWJGL 2 API on LWJGL 3) and SDL 3 windows.
It can run as a dedicated server too. Licence: not LGPL. Cleanroom's maven POM (0.7.14-alpha)
says CleanroomMC License 1.0, "visible-source, not open source": running and using it is
allowed, public redistribution of its jars is not, and CONTRIBUTING.md puts its source off
limits (custom licence). So the player's machine downloads it from Cleanroom's maven, the bridge
runs it as it is, and nobody reads its source. It needs Mojang's 1.12.2 jar, fetched like 26.3's
(pinned in research-lock.json, never committed).
How it would boot here:
horizon-jvm(already starts a Java 25 VM) puts Cleanroom's libraries on a class path of their own and callsFoundation.mainwith FML's client tweaker plus ours (dev.horizonlab.bridge112.HorizonTweaker). It must be the client side: Forge strips@SideOnly(Side.CLIENT)code on a server, and we need the mods' screens and models.- Our launch target runs
Minecraft's normal start-up (mods' preInit/init/postInit, texture stitching, model baking) with an SDL window that is hidden (Window.Builder.hidden; Cleanroom already makes a hidden 1×1 "shared context" window). It usesSDL_VIDEO_DRIVER=offscreen(EGL) where there is no display (the cloud sandboxes: Mesa llvmpipe). Then it never entersMinecraft.run(): Horizon's clock drivesrunTick. - A mirror
MinecraftServer(anIntegratedServerin shape, like the 26.3 mirror) whoseWorldServers read Horizon's world, ticked from Horizon's server tick. One 1.12 local connection (NetworkManager.provideLocalClient) per player joins the headless client to it, so FML's handshake and the 687 mod messages work unchanged. The client's world fills from vanilla's own chunk packets (keep its view distance small).
Traps found already:
- Forge decides the side by thread group, not thread name:
getEffectiveSide()is SERVER only on threads inSidedThreadGroups.SERVER. Horizon's JNI-attached "Server thread" is in the main group, so its 1.12 calls would look like client calls. So server work runs on a Java thread made in that group (Horizon hands it the tick and waits). The client runs on its own thread that owns the GL context. - Pin Cleanroom. It is alpha (0.7.x); its Kirino render engine is work in progress and may change the client's GL path we hook.
- SF4's Cleanroom list (the PTFE optimisation guide's SF4 section): remove FastFurnace, FastWorkbench, FoamFix, JEI (→ Had Enough Items), Mercurius, Shadowfacts' Forgelin (→ Forgelin-Continuous), Surge, SwingThroughGrass, Toast Control. Swap Mekanism and its Generators for Mekanism CE. Update Flux Networks and CraftTweaker. Add Fugue and Scalar Legacy. The pack importer should apply this list.
- 1.12 ids: FML numbers blocks (4096) and items per world (
level.datFMLregistry). Keep the mirror's numbers inhorizon-java-112/registry.datfor good: some mods save numeric ids in NBT.
Height. 1.12 is y 0..255. A Horizon world made for a 1.12 pack overrides the overworld's
dimension type with a data pack (min_y 0, height 256), so mods and Horizon agree. The Nether
and End already are 0..255. Upgraded 1.12 saves already open this way in vanilla.
Vanilla blocks, 1.12 → 26.3: datafix/block_state_data.rs (vanilla's BlockStateData:
id << 4 | meta → 1.13 state; generated from vanilla), then the later block renames of
Horizon's datafix chain up to 26.3. Properties that 1.12 computes (getActualState: fence and
pane connections, stair shapes, door halves, snowy grass) come from Horizon's own shape updates
once placed. Flower pots, beds, banners, skulls and note blocks carry part of their state in the
tile entity: convert with the TE (as chunk_flatten.rs does on upgrade).
Vanilla blocks, 26.3 → 1.12 (what 1.12 code reads from Horizon's world): the inverse table,
built once. States with no 1.12 form: drop the new properties (waterlogged), else use one of a
few placeholder 1.12 blocks (horizon112:modern_solid / _transparent / _liquid / _air)
with the right material, so mods see "some solid block". Biomes: 26.3 → the nearest 1.12 biome id
(2D in 1.12: the column's biome at the surface).
Mods' blocks: one Horizon content-mod block per 1.12 block, named as registered
(modid:path; 1.12 lowercases), with only the stored states: the distinct
getStateFromMeta(0..15), at most 16 per block. This is far smaller than 26.3's state sets
(ALA's 76k problem doesn't exist here). Properties that come from getActualState or
getExtendedState (pipe connections, CTM, AE2 cables) aren't stored: their look comes from the
1.12 client per position (see Drawing). Mods' fluids are Forge BlockFluidClassic/Finite, so
they run as foreign fluids, the same path bridge-mixins-9 built for Fabric mods' fluids.
Items: 1.12 = item + damage/meta + NBT.
- Vanilla:
datafix/items.rs(ItemStackTheFlatteningFix,dye:4→lapis_lazuli) + renames, and the item-NBT fixes (enchantments, display names) in reverse for the way back. - Mod items with subtypes (
getHasSubtypes: Thermal'smaterial:128is copper ingot) become one 26.3 item per listed meta (getSubItemsover all creative tabs),modid:path.meta. Damageable items become one item withmax_damage/damage. A meta nobody lists keeps the base item with its damage. - NBT goes whole into
custom_data, so a stack survives the round trip. Horizon reads its own components from it (name, lore, enchantments) where it needs them. Item capabilities (ForgeCaps: energy, fluid in item) stay in that NBT. - OreDictionary → item tags (
oredict:ingotcopper), so exported recipes can name them.
Tile entities: mods' TEs live in Java, as HorizonBlockEntities.LIVE does. They are ticked
(ITickable) and saved as 1.12 NBT in horizon-java-112/tile_entities/. Horizon's own
containers (chests, furnaces, hoppers, dispensers) get 1.12 copies, as COPIES does, with item
conversion both ways. Forge's capabilities on them then let Thermal ducts, XNet, Integrated
Tunnels, AE2, Mekanism and SSN move items into Horizon's chests. Horizon's hoppers ask Java's
IItemHandler on a mod block's face (bridge-mixins-8's path, with Forge's capability in place of
Fabric's ItemStorage).
Entities: mods' entities live and tick in Java, on the mirror's world (Twilight Forest's 56
mobs; their AI reads Horizon's blocks through the mirror). Drawing: their ModelBase trees
(ModelRenderer: boxes, rotation points, angles after setRotationAngles) map directly onto the
part trees Horizon's java_entities.rs already draws. Horizon's own mobs get copies when a mod
event needs one (hurt, death, drops, interact), as HorizonVanillaActions does.
Players: one 1.12 EntityPlayerMP per player, inventory synced through the item mapping.
Its NBT (Baubles, GameStages, Astral Sorcery perks: ForgeCaps) is saved per UUID in
horizon-java-112/players/. Prestige's global unlocks live in its own files.
Recipes: CraftTweaker, ContentTweaker and the mods change the registries in Java at load.
Export the expressible crafting-table recipes (shaped/shapeless, ore-dict ingredients as tags)
and furnace recipes (meta-sensitive) to Horizon. Route the crafting result to Java for custom
IRecipes (71) and whenever RecipeStages is loaded (gating per player). Machines keep their
recipes in Java.
Worldgen: a dimension whose IChunkGenerator is a mod's runs in Java. The 1.12 chunk is
written as 1.12 Anvil NBT (AnvilChunkLoader.writeChunkToNBT) and upgraded by Horizon's own
datafix chain (chunk_flatten.rs = vanilla's ChunkPalettedStorageFix), taught the mods'
numeric ids from the FML registry. This reuses the code that opens 1.12 saves. Population (1.12
populates at +8,+8 over 2×2 chunks, IWorldGenerators too) uses the held-region pattern of
worldgen_decorate. SF4's default overworld is Topography's void + spawn template: place the
template (1.12 structure NBT → convert blocks) when the world is made.
1.12 draws with OpenGL 1.x–2.x calls (GlStateManager, Tessellator, display lists, GL11).
There is no backend to swap out, so the plan splits by what is drawn:
| What | How | Needs GL? |
|---|---|---|
| Block models (static) | Export baked quads per stored state from ModelManager (IBakedModel.getQuads for every side + null), sprites from the 1.12 block atlas (TextureAtlasSprite frames, CPU side). Becomes Horizon's quad models (like obj.rs). Covers vanilla JSON, Forge blockstates, OBJ/B3D and static custom models |
no |
| Blocks whose look depends on neighbours or a TE (CTM, Chisel, AE2 cables, ducts) | The 1.12 client gives quads per position (getActualState → getExtendedState → getQuads) when the chunk changes; Horizon's mesher takes per-position overrides (new, like hide_model_drawn_by_block_entity) |
no |
| Item icons in inventories | Draw each stack's GUI icon with RenderItem in the hidden context into an FBO, read it back into an icon atlas. Cache by item+meta+NBT hash (Tinkers' tools are built from NBT) |
yes |
| Screens and HUD overlays | The mod's GuiScreen drawn for real into an FBO at the window's size, read back, sent as an image frame (the 512-slot big-image path Xaero's map uses); mouse and keys forwarded. Works for every mod; text is pixels |
yes |
TESRs, entities, held items, RenderWorldLast |
A GL recorder: a Foundation transformer that redirects mods' and vanilla client classes' GL11/GlStateManager matrix, texture, colour and display-list calls and Tessellator.draw into a recorder during world passes. It records meshes with matrices and textures, which Horizon draws as HorizonEntityRender meshes. Outside world passes the calls go to real GL |
records |
| Topography's sky and fog | Horizon draws them itself from the preset (textures, angle ranges) | no |
- Boot (
boot112). Cleanroom inside the bridge's JVM: fetch and pin Cleanroom, Mojang's 1.12.2 jar and libraries; boot hidden through postInit with a fixture mod and then the SF4 server pack plus Cleanroom's swaps. Dump facts (blocks with stored states, items with subtypes, fluids, entities, biomes, dimensions, registry ids). Measure start time and memory. Write the platform code injava/platform112/against Cleanroom's dev jars (MCP names, reobfuscated to SRG by CleanroomGradle). - First block (
placed112). Content conversion for 1.12: blocks, items, baked-quad models, sprites, the vanilla mapping both ways. A 1.12 mod's block (Snad, a Chisel block, a Thermal ore) placed and drawn in Horizon, saved and reloaded. Screenshot. - Mirror world and machines (
machine112).WorldServerover Horizon's blocks, mod TEs ticking and saved, Horizon's containers as copies with Forge's item capability. Test: a Simple Generators furnace generator powering a Mekanism smelter fed by a Horizon hopper, output piped into a Horizon chest. - Screens (
gui112). Local connections,IGuiHandler/openGui, the FBO frame read back, input forwarded, slot clicks through the mod's ownContainer. Test: open and use the smelter. - SkyFactory start (
sf4). Topography void + spawn template, Forgiving Void, Sky Orchards' saplings growing (random ticks of mod blocks), GameStages/Prestige, advancements on the mirror shown in Horizon's screen, crafting through CraftTweaker's recipes and RecipeStages. - The Forge event table. The table above, at the Fabric bridge's hook points, with the routed-action rule (a cancellable event a mod subscribes to: ask first, honour the cancel). Movement mods (Iron Jetpacks, Wall-Jump, Elevator) change the client's motion: they need Horizon's client prediction to take the 1.12 client's velocity.
- In-world drawing. The GL recorder (TESRs, mod entities, held items), per-position models, item icons.
- The rest. Twilight Forest, Compact Machines, Hunting Dimension, Lost Cities, Mystcraft; LAN and dedicated servers; the launcher's SkyFactory import (CurseForge pack zip → Cleanroom swaps → mods folder).
- Translating 1.12 mods to 26.3 (remap and shim): Forge 1.12's API (metadata, rendering, registries, capabilities, world gen) has no 26.3 counterpart. A shim would mean rewriting Forge 1.12 on 26.3. That route stays for 1.20–1.21 mods only.
- A real Cleanroom server in its own process, with Horizon as a 1.12-protocol client: less bridging, but Horizon becomes only a window. It still needs the same content conversion, and it keeps 1.12's slow server for everything. Keep it as a fallback if the mirror's translation costs too much on big automated bases.
- Running 1.12 and Fabric 26.3 mods in one world: two
net.minecrafttrees in one VM can work in separate class loaders, but there is no pack that needs it.
- Cleanroom: github.com/CleanroomMC/Cleanroom (README;
CHANGELOG.md0.7.14-alpha, 2026-10-28;build.gradle: Foundation 0.22.2, LWJGL 3.4.3;FMLCommonHandler.getEffectiveSide;client/sdl/Window.java), cleanroommc.com/wiki (end-user guide: Java 25, LWJGL 3, Fugue and Scalar Legacy). - SF4 on Cleanroom: Polytetrafluoroethylene-PTFE/MC-Optimization-Guide,
modpack-specific/packs-1.12.2.md; Rongmario's "Cleanroom Modpack Migration Notes" gist. - SkyFactory 4.2.4 server files: curseforge.com/minecraft/modpacks/skyfactory-4/files/3565687.