Max collisions optimization (#1038)

* Lift entity limit up to the `getOtherEntities` method so it bails early

This has the potential to prevent a lot of bounding box computation

* Clean up decompiled code

* Fix raw generic types

This doesn't alter the signature, but it helps the compiler warn about misuse of the type later on

* Actually abort forEach when `limit` entities have been checked

`throw`ing a known exception is the easiest way to `break` out of a forEach call
This commit is contained in:
Mitchell Skaggs authored and GitHub committed 2021-08-03 07:20:09 -03:00
1 parent 56a15fb384
commit 28cb136c6b
6 files changed
+97 -29

No files matched your search

+2 -1
View File
@@ -86,6 +86,7 @@
"PistonHandler_pushLimitMixin",
"PoweredRailBlock_powerLimitMixin",
"LivingEntity_maxCollisionsMixin",
"World_getOtherEntitiesLimited",
"CoralBlockMixin",
"CoralFanBlockMixin",
"CoralFeatureMixin",
@@ -241,4 +242,4 @@
"injectors": {
"defaultRequire": 1
}
}
}