diff options
Diffstat (limited to 'patches/api/0158-Add-LivingEntity-getTargetEntity.patch')
-rw-r--r-- | patches/api/0158-Add-LivingEntity-getTargetEntity.patch | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/patches/api/0158-Add-LivingEntity-getTargetEntity.patch b/patches/api/0158-Add-LivingEntity-getTargetEntity.patch index 5ec536beeb..20b94e44f1 100644 --- a/patches/api/0158-Add-LivingEntity-getTargetEntity.patch +++ b/patches/api/0158-Add-LivingEntity-getTargetEntity.patch @@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f52644fab1522bdf83ff4f489e9805b2 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index ad885a0775b387e3e8ca6bfae80c18465038056c..93d20f67bf856d80226470ae2442d199d3e2f45b 100644 +index ad885a0775b387e3e8ca6bfae80c18465038056c..454533528fc05f632b22ca81909b6eac3841e26e 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -151,6 +151,50 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -151,6 +151,61 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ @Nullable public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, @NotNull com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode); @@ -82,6 +82,17 @@ index ad885a0775b387e3e8ca6bfae80c18465038056c..93d20f67bf856d80226470ae2442d199 + * Gets information about the entity being targeted + * + * @param maxDistance this is the maximum distance to scan ++ * @param ignoreBlocks true to scan through blocks ++ * @param entityPredicate predicate to determine if an entity can be targeted ++ * @return entity being targeted, or null if no entity is targeted ++ */ ++ @Nullable ++ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks, @Nullable java.util.function.Predicate<Entity> entityPredicate); ++ ++ /** ++ * Gets information about the entity being targeted ++ * ++ * @param maxDistance this is the maximum distance to scan + * @return TargetEntityInfo about the entity being targeted, + * or null if no entity is targeted + */ |