Skip to content

Conversation

@Goldenfield192
Copy link
Member

This pr adds two methods
public <T extends Entity> List<T> getEntitiesWithinBB(IBoundingBox bb, Class<T> type)
and
public <T extends Entity> List<T> getEntitiesWithinBB(IBoundingBox bb , Predicate<T> filter, Class<T> type)
to improve performance when trying to get entities within given BB (think hopper)

It would be a disaster to use old getEntities which iterates the whole world even if we only want to scan a small space, and I think the cost of converting and casting Minecraft entities again here is reasonable

Goldenfield192 added a commit to Goldenfield192/UniversalModCore that referenced this pull request Nov 29, 2025
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.

1 participant