Add builtin compat with Repurposed Structures #6139
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.
Note, I setup the houses differently than what you currently do. I have 1 house for every village type. And then have an inner jigsaw that spawns a random workstation. This way I do not need multiple copies of the same house just to change the workstation and makes adding new workstations easier.
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.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/TwelveIterationMods/Waystones/blob/6a54aeeb05b88b24cf61722bd151e0362f2429ec/common/src/main/resources/data/waystones/rs_pieces_spawn_counts/village_badlands.json#L8
https://github.com/TwelveIterationMods/Waystones/blob/6a54aeeb05b88b24cf61722bd151e0362f2429ec/common/src/main/resources/data/waystones/rs_pool_additions/villages/badlands/houses.json#L13
Datapack form of this PR if wish to test it outside PR:
Repurposed_Structures-Immersive_Engineering_PR-Prototype.zip