Add API to get Tile Entities in a Chunk by Predicate#4907
Merged
Conversation
Proximyst
suggested changes
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
MrIvanPlays
reviewed
Dec 18, 2020
Proximyst
previously approved these changes
Dec 18, 2020
Contributor
Proximyst
left a comment
There was a problem hiding this comment.
LGTM! Imports are a non-issue. Best conflicts are import conflicts; no thinking involved 😁
DenWav
previously approved these changes
Dec 20, 2020
Contributor
|
@limbo-app ready |
limbo-app
approved these changes
Dec 24, 2020
limbo-app
left a comment
There was a problem hiding this comment.
Pull request automatically approved for merging - a core team member has previously approved this pull request.
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.
Currently, if someone wants to get all sign BlockState instances in a chunk, they end up parsing BlockEntity data of all BlockEntities in the chunk.
This means that a simple task like scanning sign lines ends up loading the contents of every container.
This API adds another method that takes a
Predicate<Block>, to allow plugins to filter down by factors such as material, position, biome, etc. Due to the non-certain number of results here, some optimisations from the non-predicate version had to be omitted (pre-allocating array size).