Cannot remap IDs to KubeJS created IDs #6
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
TysonTheEmber/RemapIDs#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mod Loader
NeoForge 1.21.1
Mod Version
1.3.0
Crash Log / Error Output
https://mclo.gs/N2vTmxF
Bug Description
Trying to remap an ID to something that's created by KubeJS fails, e.g.
Adding a
System.out.println(key().toString());line toremapids$beforeFreezereveals both RemapIDs's effective startup and KubeJS Startup run on/after theResourceKey[minecraft:root / minecraft:root]freeze but beforeminecraft:block& similar.This is corroborated by NeoForge unfreezing and refreezing the registries after Minecraft started freezing some of them as part of base game init, but that does not include the root registry itself; yet the
MappedRegistry::freeze()hook runs on the frozen root and expects all content to have been registered by that point, which may not have happened yet, especially if any mod is listening forRegisterEventwith@SubscribeEvent(priority = EventPriority.LOW)orEventPriority.LOWEST, like KubeJS does.The general design of the mod seems to be based on the incorrect assumption1 that here exists a point in time where you can obtain a fully initialized picture of all of
BuiltInRegistries.BLOCK,ITEM,FLUIDandENTITY_TYPEat once whilst none of those registries are frozen yet. This is fundamentally wrong andSteps to Reproduce
Other Mods Installed
As exhibited by
RemapState::finalizeIfPending()and its "only the first call performs resolution" comment, andRemapConfiginitialization being single-stage ↩︎Will look into this and prob revamp the system in the next update, looks like a similar issue to #5