Repository navigation
Conversation
This was
linked to
issues
Oct 3, 2026
JustAHuman-xD
left a comment
Contributor
There was a problem hiding this comment.
Quickish review from my phone, I'll try to do a more in depth one later
Comment on lines
+618
to
+619
| data class Block(val block: org.bukkit.block.Block, override val location: Location) : PlayerTarget | ||
| data class Entity(val entity: org.bukkit.entity.Entity, override val location: Location) : PlayerTarget |
Contributor
There was a problem hiding this comment.
Don't love the name collision
Member
Author
There was a problem hiding this comment.
what do u suggest they be named instead? realistically theyre always gonna be referenced as PlayerTarget.Block, etc outside of this interface
# Conflicts: # rebar/src/main/kotlin/io/github/pylonmc/rebar/util/RebarUtils.kt
Intybyte
reviewed
Oct 20, 2026
Comment on lines
+7
to
+10
| /** | ||
| * A [BVH tree](https://en.wikipedia.org/wiki/Bounding_volume_hierarchy) storing exactly two children per node. | ||
| * This gives a sublinear intersection testing complexity, with best-case O(log2 n) and worst-case O(n). | ||
| */ |
Member
There was a problem hiding this comment.
why is this a thing? isn't this just a binary tree? such structures should already exist in the java lib, if this is really needed can you add more docs about it here?
Member
Author
There was a problem hiding this comment.
read the wikipedia page pls 🙏
This branch has not been deployed
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.
By assuming an item display is a 1x1x1 cube, intersection checks can be successfully performed no matter the transformation of the entity.
This is actually a very small part of the PR, the majority of the code is focused on making said checks fast. Testing has given about 400 μs on a 1000-item random tree and 1 ms on a 10000-item random tree. Random trees are the worst case for this kind of thing, I expect real world perf to be better.
I have switched wiring, electric ports, and fluid endpoints to this system, and tested all. This also solves pretty much every issue with wiring (there are/were a lot lol).
This also enables a lot for us, for example an interactive in-world assembly table or smth, or WAILA for display entities.
Resolves #913.