Skip to content
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

Various changes to StructureTemplates, 1.21 branch. #9

Open
wants to merge 2 commits into
base: 1.21
Choose a base branch
from

Conversation

solonovamax
Copy link

@solonovamax solonovamax commented Jun 14, 2024

Changed several things to do with StructureTemplates:

  • Add support for structure block keys with a list of items (Fixes Support structure block keys with a list of items #7)
  • Add iterator to structure template
  • Add getters for structure template fields (I personally had a usecase where I wanted to access some of the fields)
  • Support pickblocking the block in the structure preview. (if a structure preview is active and you middle-click on a block, it will place it into your inventory if in creative, or take it from the items you have in your inventory if in survival)
  • Persist structure previews across world reloads (exiting then re-opening world)

@solonovamax solonovamax changed the title Add support for structure block keys with a list of items. 1.21 branch. Various changes to StructureTemplates, 1.21 branch. Jun 25, 2024
@solonovamax solonovamax force-pushed the structure-entries-list/1.21 branch from 1b537b1 to 694b48b Compare June 29, 2024 21:03
… in keys

Allow for arrays of strings in the keys of a structure template.
All the elements are parsed the same as they previously were,
this just allows for defining a list of possible blocks.

Also clean up code a decent amount to make it a tad more maintainable.

Signed-off-by: solonovamax <[email protected]>
- Implement Iterable<Pair<BlockPos, BlockStatePredicate>> for StructureTemplate
- Convert all fields to getters and introduce getters for more fields

Signed-off-by: solonovamax <[email protected]>
@solonovamax solonovamax force-pushed the structure-entries-list/1.21 branch 2 times, most recently from b14a32f to 813ce70 Compare June 29, 2024 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support structure block keys with a list of items
1 participant