feat: possible second implementation of the new structure system - #24
Open
noone-075 wants to merge 4 commits into
Open
feat: possible second implementation of the new structure system#24noone-075 wants to merge 4 commits into
noone-075 wants to merge 4 commits into
Conversation
- the old API is fully usable in api.structure.* but deprecated and mark for removal - the new API is located in api.structures.* and it would be the new way to create structures - the new API works with 2 types of structures: LocatedStructure and RelativeStructure - LocatedStructure is a structure that is generated at a specific location and it can be placed without specifying a location, it is already located - RelativeStructure is a structure that is generated relative to a location and it can be placed to any location, it is not located - each of them uses a PlacebleStructure (either LocatedPlacebleStructure or RelativePlacebleStructure) to build the structure and place it. - to make a new Structure, you need to extend either of them, and implement the build() method to return the correct type of PlacebleStructure - they use custom placeble blocks (LocatedBlock, RelativeBlock), they can also override the place function for custom behavior - then implementing the GenerableStructure interface is optional, it allows the structure to have the function needed to be generated in the world, if used by a chunk generator. THIS IS NOT A FINAL IMPLEMENTATION, IT IS STILL IN DEVELOPMENT AND MAY CHANGE IN THE FUTURE.
noone-075
marked this pull request as ready for review
September 5, 2026 17:30
Closed
colbster937
self-requested a review
September 5, 2026 19:09
colbster937
requested changes
Sep 5, 2026
colbster937
left a comment
Member
There was a problem hiding this comment.
i have requested all the changes i want (i'll fix what i can). i would also like to keep the package the same as the old api as to keep it consistent (singular words, not plural).
colbster937
self-requested a review
September 5, 2026 19:33
colbster937
reviewed
Sep 5, 2026
Member
|
it would also be a good idea to rename some classes (e.g. "Block") to not be the same as a bukkit class name, so they can be used in classes that already import bukkit classes |
Contributor
Author
What about, it might be redundant but: PlaceableBlock. |
noone-075
commented
Sep 6, 2026
noone-075
commented
Sep 6, 2026
noone-075
force-pushed
the
wait-for-it
branch
from
September 6, 2026 13:52
39388bb to
c58e3b6
Compare
This file contains hidden or 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
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.
THIS IS NOT A FINAL IMPLEMENTATION, IT IS STILL IN DEVELOPMENT AND MAY CHANGE IN THE FUTURE.