diff options
author | Shane Freeder <[email protected]> | 2024-05-09 14:51:33 +0100 |
---|---|---|
committer | Shane Freeder <[email protected]> | 2024-05-09 14:51:33 +0100 |
commit | 3693bbdc6b65e68db10375d3eeab70f06708b729 (patch) | |
tree | 4a71a5e6e5f50b3e2937053a5d4b4196ef67665b /patches/api/0282-Add-Mob-lookAt-API.patch | |
parent | f2512b12385961f8ca1f69efebe5ed0e00c0caa8 (diff) | |
download | Paper-3693bbdc6b65e68db10375d3eeab70f06708b729.tar.gz Paper-3693bbdc6b65e68db10375d3eeab70f06708b729.zip |
Use internals for getting block/entity countstimings/use-internals
For a long time I've been meaning to move some of this logic internally
as this would allow us to avoid hitting systems like block state snapshots
which can create issues as many of the spigot implementations of this
stuff are increasingly broken, leading to unexpected crashes during ticking,
even if the API cannot properly interact with these such states/items,
it's generally more preferable to not crash the server in the course,
and just let those interactions fail more gracefully.
Diffstat (limited to 'patches/api/0282-Add-Mob-lookAt-API.patch')
-rw-r--r-- | patches/api/0282-Add-Mob-lookAt-API.patch | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/patches/api/0282-Add-Mob-lookAt-API.patch b/patches/api/0282-Add-Mob-lookAt-API.patch deleted file mode 100644 index 0dd5126905..0000000000 --- a/patches/api/0282-Add-Mob-lookAt-API.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: BillyGalbreath <[email protected]> -Date: Fri, 14 May 2021 13:42:06 -0500 -Subject: [PATCH] Add Mob#lookAt API - - -diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java -index 7eee2e561346ac1d672f9652edb78e76c910fc9d..11b6d1aba7d1f6ae1f3c822193486f5a1478e105 100644 ---- a/src/main/java/org/bukkit/entity/Mob.java -+++ b/src/main/java/org/bukkit/entity/Mob.java -@@ -27,6 +27,88 @@ public interface Mob extends LivingEntity, Lootable { - * @return True if mob is exposed to daylight - */ - boolean isInDaylight(); -+ -+ /** -+ * Instruct this Mob to look at a specific Location -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param location location to look at -+ */ -+ void lookAt(@NotNull org.bukkit.Location location); -+ -+ /** -+ * Instruct this Mob to look at a specific Location -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param location location to look at -+ * @param headRotationSpeed head rotation speed -+ * @param maxHeadPitch max head pitch rotation -+ */ -+ void lookAt(@NotNull org.bukkit.Location location, float headRotationSpeed, float maxHeadPitch); -+ -+ /** -+ * Instruct this Mob to look at a specific Entity -+ * <p> -+ * If a LivingEntity, look at eye location -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param entity entity to look at -+ */ -+ void lookAt(@NotNull Entity entity); -+ -+ /** -+ * Instruct this Mob to look at a specific Entity -+ * <p> -+ * If a LivingEntity, look at eye location -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param entity entity to look at -+ * @param headRotationSpeed head rotation speed -+ * @param maxHeadPitch max head pitch rotation -+ */ -+ void lookAt(@NotNull Entity entity, float headRotationSpeed, float maxHeadPitch); -+ -+ /** -+ * Instruct this Mob to look at a specific position -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param x x coordinate -+ * @param y y coordinate -+ * @param z z coordinate -+ */ -+ void lookAt(double x, double y, double z); -+ -+ /** -+ * Instruct this Mob to look at a specific position -+ * <p> -+ * Useful when implementing custom mob goals -+ * -+ * @param x x coordinate -+ * @param y y coordinate -+ * @param z z coordinate -+ * @param headRotationSpeed head rotation speed -+ * @param maxHeadPitch max head pitch rotation -+ */ -+ void lookAt(double x, double y, double z, float headRotationSpeed, float maxHeadPitch); -+ -+ /** -+ * Gets the head rotation speed -+ * -+ * @return the head rotation speed -+ */ -+ int getHeadRotationSpeed(); -+ -+ /** -+ * Gets the max head pitch rotation -+ * -+ * @return the max head pitch rotation -+ */ -+ int getMaxHeadPitch(); - // Paper end - /** - * Instructs this Mob to set the specified LivingEntity as its target. |