Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Ores to Field Guide#5

Merged
Pyritie merged 8 commits into
Pyritie:space2from
Nebby1999:pyritie/space2/feature/OresToFieldGuide
Feb 2, 2025
Merged

Ores to Field Guide#5
Pyritie merged 8 commits into
Pyritie:space2from
Nebby1999:pyritie/space2/feature/OresToFieldGuide

Conversation

@Nebby1999
Copy link
Copy Markdown
Collaborator

What is the new behavior?

This PR adds the finalized version of the Ores to Field Guide program, allowing for automatic creating of patchouli entries via the utilization of localization tokens and mineral data json files.

Implementation Details

The program itself was written using newtonsoft JSON's capabilities for deserializing and serializing objects from .NET to JSON
The following key classes exist:

Main Class

The actual class with the program's entrypoint, above it has some precompiler clauses that can be commented and uncommented to allow the change of some outcomes.

  • VERIFY_VEIN_WEIGHTS: Makes sure that an ore's weight across a vein is constant, to avoid having certain stone types be more bountiful than others
  • PRETTY_PRINT: The program will write JSON in an indented format, only useful for debugging purposes and the finalized JSON file on the modpack should have this option disabled to save space
  • OVERWRITE_FILES: The program's output will be placed immediatly on the folder .minecraft/kubejs/assets/../tfg_ores/

Program Arguments:

The actual arguments used by the program, these are obtained "automagically" based off assumptions.

JSONObjects

A folder instead of a class, this folder contains any and all JSON related objects such as:

  • MineralData: Represents a mineral_data json
  • LocalizationTokens: Represents tokens for usage in localization purposes
  • Vein: Represents a vein.json file within the ConfiguredFeatures folder in the data (what actually gets placed in the world
  • PatchouliEntry: a representation of a patchouli entry.
  • PatchouliPage: An abstract class to represent patchouli pages, includes all the default patchouli pages.

Outcome

Updating the field guide's ore entries is no longer torture

Additional Information

This is a bit of a mess, i tried to explain the thought process where applicable, but if you need some explanation lmk

Potential Compatibility Issues

Only if youre not based

Comment thread tools/OresToFieldGuide/JsonUtility.cs Outdated
Comment thread tools/OresToFieldGuide/MainClass.cs Outdated
Comment thread tools/OresToFieldGuide/MainClass.cs Outdated
@Pyritie Pyritie merged commit f9a5bb0 into Pyritie:space2 Feb 2, 2025
@Nebby1999 Nebby1999 deleted the pyritie/space2/feature/OresToFieldGuide branch February 3, 2025 22:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants