Add blueprint system for generating villages #6
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 pull request introduces a blueprint system to the
villages-mod
for Minecraft, allowing users to store building blueprints in JSON format and use them to generate villages. The changes include updates to theREADME.md
file, new Java classes for handling blueprints, and modifications to the configuration and main mod files.Blueprint System Implementation:
README.md
: Added documentation for the blueprint system, including instructions for adding custom blueprints.src/main/java/com/davisodom/villages/Blueprint.java
: Implemented theBlueprint
class to load and save blueprints from JSON files.Blueprint Selection Handling:
src/main/java/com/davisodom/villages/BlueprintSelection.java
: Created theBlueprintSelection
class to store the coordinates of selected blueprint corners.src/main/java/com/davisodom/villages/BlueprintSelectionHandler.java
: Implemented theBlueprintSelectionHandler
class to handle player interactions for selecting blueprint corners.src/main/java/com/davisodom/villages/BlueprintSelectionStorage.java
: Added theBlueprintSelectionStorage
class to store player blueprint selections.Configuration Updates:
src/main/java/com/davisodom/villages/Config.java
: Added configuration options for enabling blueprint saving and logging blueprints, and updated the configuration loading logic. [1] [2] [3] [4]Main Mod Changes:
src/main/java/com/davisodom/villages/Villages.java
: Registered the new configuration options, blueprint selection handler, and added logic to load blueprints and generate villages on server start. [1] [2] [3] [4] [5]Add a system for storing building blueprints and generating villages using these blueprints.Blueprint Class: Create
Blueprint.java
to represent building blueprints with fields for name, dimensions, and block data. Add methods to load and save blueprints from JSON files.Villages Class: Modify
Villages.java
to load blueprints fromsrc/main/resources/blueprints
and generate villages using these blueprints. Add methodsloadBlueprints
andgenerateVillage
.Configuration: Update
Config.java
to add a configuration option to enable or disable blueprint logging.Example Blueprint: Add
example_blueprint.json
insrc/main/resources/blueprints
as an example blueprint with a detailed structure.Documentation: Update
README.md
to include information about the new blueprint system and instructions on how to add custom blueprints.For more details, open the Copilot Workspace session.