Skip to content

Structure API revamp - #20

Closed
noone-075 wants to merge 12 commits into
WebMCDevelopment:mainfrom
noone-075:main
Closed

Structure API revamp#20
noone-075 wants to merge 12 commits into
WebMCDevelopment:mainfrom
noone-075:main

Conversation

@noone-075

Copy link
Copy Markdown
Contributor
  • structures are now built per location/seed instead of being singleton instances
  • added chunk-aware placement and slicing via PlaceableStructure and getChunk(...)
  • structures can now be used directly in a ChunkGenerator workflow
  • added AbstractGenerableStructure.locateNearest(...) for generation lookup
  • updated HerobrineShrineTestStructure and RickQRCodeTestSchemStructure to the new API
  • removed getInstance() usage; construct structure objects directly
  • simplified the wlib debug command to select by name instead of using clazz
  • kept a registration helper for centralized structure discovery

Pull request created but waiting for 1.3.0 to be released

noone-075 and others added 3 commits September 1, 2026 16:33
- structures are now built per location/seed instead of being singleton instances
- added chunk-aware placement and slicing via PlaceableStructure and getChunk(...)
- structures can now be used directly in a ChunkGenerator workflow
- added AbstractGenerableStructure.locateNearest(...) for generation lookup
- updated HerobrineShrineTestStructure and RickQRCodeTestSchemStructure to the new API
- removed getInstance() usage; construct structure objects directly
- simplified the wlib debug command to select by name instead of using clazz
- kept a registration helper for centralized structure discovery
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractGenerableStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractGenerableStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractGenerableStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractBaseStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
Comment thread dependency-reduced-pom.xml Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/structure/RickQRCodeTestSchemStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractBaseStructure.java Outdated
- fixed all errors from @colbster937's review
- changed some if chains to switch statements (WLIBCommand.java)
- dependency-reduced-pom.xml is now in my local .gitignore

@noone-075 noone-075 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then its ready, keep open until you push 1.3.0

@colbster937
colbster937 marked this pull request as ready for review September 2, 2026 11:48
@colbster937
colbster937 marked this pull request as draft September 2, 2026 11:48

@colbster937 colbster937 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be the only things left to change until the 1.3.0 merge

Comment thread src/main/java/xyz/webmc/wlib/api/structure/PlaceableStructure.java
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java
Comment thread src/main/java/xyz/webmc/wlib/internal/structure/RickQRCodeTestSchemStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/structure/RickQRCodeTestSchemStructure.java Outdated
github-actions Bot and others added 4 commits September 2, 2026 12:04
- HerobrineShrineTestStructure now extends AbstractGenerableStructure instead of AbstractBaseStructure
- Added getGenerationSeed method to AbstractGenerableStructure
- fixed review comments
- fix code issues
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractBaseStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractGenerableStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/api/structure/AbstractGenerableStructure.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
Comment thread src/main/java/xyz/webmc/wlib/internal/command/WLIBCommand.java Outdated
@colbster937

Copy link
Copy Markdown
Member

@noone-075 I've submitted a PR to your fork (noone-075#2) that fixes most of the issues, but i wont be merging this until the legacy api is compatible. once i end up removing the legacy api in a future update, then we can go back to the current proposed system. I'd also like to point out that WLIB's structure system is NOT specifically for generating structures naturally (even though thats what dblk uses it for), therefore we don't need anything related to it.

@noone-075

Copy link
Copy Markdown
Contributor Author

new pr here

@colbster937 colbster937 closed this Sep 5, 2026
@WebMCDevelopment WebMCDevelopment locked and limited conversation to collaborators Sep 5, 2026
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