From 18470db17f12632a43eba617ba7b739fc033d215 Mon Sep 17 00:00:00 2001 From: Moulberry Date: Sun, 12 Mar 2023 20:50:02 +0800 Subject: [PATCH] Fix getTargetEntity not targeting creative players (#8960) --- patches/server/0268-Add-LivingEntity-getTargetEntity.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/0268-Add-LivingEntity-getTargetEntity.patch b/patches/server/0268-Add-LivingEntity-getTargetEntity.patch index 1d8fa881b41..da100c4d13b 100644 --- a/patches/server/0268-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0268-Add-LivingEntity-getTargetEntity.patch @@ -29,7 +29,7 @@ index 24a07ef9f5cbed34d1aefccda9fe655b7dfef7ec..3cb7bca86c6b0696db7ad156d09e29e9 + Vec3 direction = this.getLookAngle(); + Vec3 end = start.add(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance); + -+ List entityList = level.getEntities(this, getBoundingBox().expandTowards(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance).inflate(1.0D, 1.0D, 1.0D), EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(Entity::isPickable)); ++ List entityList = level.getEntities(this, getBoundingBox().expandTowards(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance).inflate(1.0D, 1.0D, 1.0D), EntitySelector.NO_SPECTATORS.and(Entity::isPickable)); + + double distance = 0.0D; + EntityHitResult result = null;