Add built-in Repurposed Structures compat #193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will add to Repurposed Structures's villages automatically. The way it works is the special rs_ folders are read by Repurposed Structures and automatically does the piece injection. No code needed on your side.
If you wish to have these files only apply when a config is set to true, you would simply grab the
repurposed_structures:json_conditions
registry on each loader and then add the"condition"
field in thers_pool_additions
andrs_pieces_spawn_counts
json files to point to the condition you registered.Fabric: https://legacy.curseforge.com/minecraft/mc-mods/repurposed-structures-fabric/files/all?page=1&pageSize=20
NeoForge: https://github.com/TwelveIterationMods/Waystones/blob/6a54aeeb05b88b24cf61722bd151e0362f2429ec/neoforge/src/main/java/net/blay09/mods/waystones/compat/RepurposedStructuresIntegration.java#L12
The JSON condition lines:
https://github.com/LordDeatHunter/FabricWaystones/blob/60006bec36f538c945cf02e4d8dc86e7dc527d41/src/main/resources/data/fwaystones/rs_pieces_spawn_counts/village_badlands.json#L8
https://github.com/LordDeatHunter/FabricWaystones/blob/60006bec36f538c945cf02e4d8dc86e7dc527d41/src/main/resources/data/fwaystones/rs_pool_additions/villages/badlands/houses.json#L13