补充实体获取判断条件

This commit is contained in:
17146 2025-06-16 18:38:15 +08:00 committed by Light_Quanta
parent 1a691bc523
commit 82c30075f4
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -27,7 +27,7 @@ public abstract class LevelMixin {
public void getEntities(Entity pEntity, AABB pBoundingBox, Predicate<? super Entity> pPredicate, CallbackInfoReturnable<List<Entity>> cir) {
if (pEntity instanceof ProjectileEntity) {
this.getEntities().get(pBoundingBox.inflate(3), entity -> {
if (entity instanceof OBBEntity obbEntity) {
if (entity instanceof OBBEntity obbEntity && pPredicate.test(entity)) {
for (OBB obb : obbEntity.getOBBs()) {
if (OBB.isColliding(obb, pBoundingBox)) {
if (!cir.getReturnValue().contains(entity)) {
@ -39,7 +39,7 @@ public abstract class LevelMixin {
});
} else {
this.getEntities().get(pBoundingBox, entity -> {
if (entity instanceof OBBEntity obbEntity) {
if (entity instanceof OBBEntity obbEntity && pPredicate.test(entity)) {
for (OBB obb : obbEntity.getOBBs()) {
if (OBB.isColliding(obb, pBoundingBox)) {
if (!cir.getReturnValue().contains(entity)) {