Repurposed Structures (Neoforge/Forge)

Repurposed Structures (Neoforge/Forge)

58M Downloads

Blay waystones doesnt spawn in RS villages and logs error

TelepathicGrunt opened this issue ยท 2 comments

commented

Code I PRed into their mod: TwelveIterationMods/Waystones@e9d42d1

Condition that failed to be found in registry: https://github.com/ModdingForBlockheads/Waystones/blob/1.18.x/shared/src/main/resources/data/repurposed_structures/rs_pieces_spawn_counts_additions/village_birch.json#L7

Condition registering code: https://github.com/ModdingForBlockheads/Waystones/blob/e9d42d1ac0689a8b9385e1471b9c09883db10666/shared/src/main/java/net/blay09/mods/waystones/worldgen/ModWorldGen.java#L118

Error players reported to be: [27Mar2022 18:49:24.199] [Server thread/ERROR] [com.telepathicgrunt.repurposedstructures.RepurposedStructures/]: Error: Found repurposed_structures:villages/birch/houses entry has a condition that does not exist.

Me creating the condition registry:

return ((WritableRegistry<R>)Registry.REGISTRY).register(resourceKey, (R)new MappedRegistry<T>(resourceKey, Lifecycle.stable(), null), Lifecycle.stable()).value();

Where I call the registry to find the condition:

Optional<Supplier<Boolean>> optionalSupplier = JSONConditionsRegistry.RS_JSON_CONDITIONS_REGISTRY.getOptional(triple.condition.get());

Will need to look into this more when got time. Did custom registries change their behaviors? Hmmm...

commented

Issue was that I was creating the conditions registry at mod init and Waystones was registering their conditions in mod init as well. Meaning there was a rare chance that Blay may run their registry code before I make the registry which causes the RS json files in Waystones to fail later. Solution, RS now makes the conditions registry at game startup way before any mod init is ran.

commented

fixed in v5.1.1