-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Level builder #29
Merged
Merged
Level builder #29
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
NonSwag
commented
Aug 17, 2024
•
edited
Loading
edited
- Refactor world creation to use WorldPreset.
- Add generator argument to WorldImportCommand.
- Refactor WorldLoadCommand for improved level loading.
- Refactor server listener dimension loading.
- Remove loadLevel methods from PaperLevelView.
- Add PaperLevel and PaperLevelBuilder classes.
- Add new world types to properties files.
- Add levelBuilder method to WorldsProvider interface.
- Remove overloaded loadLevel methods.
- Add Level and LevelBuilder interfaces.
Introduced `Level` and `LevelBuilder` interfaces to encapsulate the properties and construction of game levels. This addition provides a structured way to manage level attributes and enables flexible creation and configuration of levels.
Consolidate and simplify the LevelView interface by removing several overloaded loadLevel methods that handle various cases. This streamlines the code and reduces redundancy, making the interface cleaner and easier to maintain.
Introduced a new method, levelBuilder, to the WorldsProvider interface, which takes a File parameter. This addition enhances the functionality of WorldsProvider by allowing the creation of levels through LevelBuilder.
Updated the properties files to include new world types: Checkerboard, Debug, and Single Biome. This change ensures that both the German and English properties files are synchronized with the latest world type definitions.
Introduce the PaperLevel and PaperLevelBuilder classes for advanced world creation and configuration. This update enhances the plugin's flexibility, enabling more detailed control over world settings, including environment, hardcore mode, structures, and custom generator presets.
Eliminated several overloaded loadLevel methods to simplify the code and reduce unnecessary complexity. The core functionality for loading levels has been streamlined, removing unneeded configurations and predicates.
Refactor the dimension loading process in ServerListener.java for clarity and better error handling. Improved logging to include dimension type and its source path, and differentiated between level directories and levels, reducing ambiguity in log messages.
Update the WorldLoadCommand to use levelBuilder for loading, ensuring only imported levels are created. This change enhances readability and robustness by leveraging Optional and streamlining the loading logic.
Extended the WorldImportCommand to support an additional "generator" argument. Adjusted the execute method to handle the new parameter and modified the level creation logic accordingly. Added persistence of the generator configuration when a world is imported.
Replaced deprecated WorldType with WorldPreset for better clarity in defining world types. Updated the creation logic to utilize a new level builder pattern, improving configurability and modularity. This refactor enhances maintainability and aligns with recent API changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.