feat: possible second implementation of the new structure system - #24
feat: possible second implementation of the new structure system#24noone-075 wants to merge 7 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.
colbster937
left a comment
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).
|
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 |
What about, it might be redundant but: PlaceableBlock. |
39388bb to
c58e3b6
Compare
- introduce the new abstract structure base and instance registry - update located/relative/placeable structure types - remove legacy structure entry and align command/test usages - added new exemple of structure
|
i think its finished tell me if it is then i wont change it until merge with upstream |
resurfacing this 4 day old comment |
THIS IS NOT A FINAL IMPLEMENTATION, IT IS STILL IN DEVELOPMENT AND MAY CHANGE IN THE FUTURE.