From 3693bbdc6b65e68db10375d3eeab70f06708b729 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 9 May 2024 14:51:33 +0100 Subject: Use internals for getting block/entity counts 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. --- ...2-new-TargetReasons-for-1.16-mob-behavior.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/api/0200-added-2-new-TargetReasons-for-1.16-mob-behavior.patch (limited to 'patches/api/0200-added-2-new-TargetReasons-for-1.16-mob-behavior.patch') diff --git a/patches/api/0200-added-2-new-TargetReasons-for-1.16-mob-behavior.patch b/patches/api/0200-added-2-new-TargetReasons-for-1.16-mob-behavior.patch new file mode 100644 index 0000000000..6c725bc833 --- /dev/null +++ b/patches/api/0200-added-2-new-TargetReasons-for-1.16-mob-behavior.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Fri, 3 Jul 2020 15:05:54 -0700 +Subject: [PATCH] added 2 new TargetReasons for 1.16 mob behavior + + +diff --git a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java +index c6e4d69eecd2789b1d78fe99fe590932e9758ba1..85b318d9ee56a3c22c6b7c9ac408f021e51cb609 100644 +--- a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java ++++ b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java +@@ -159,6 +159,14 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable { + * as wheat in its hand. + */ + TEMPT, ++ /** ++ * When the target is in a different dimension ++ */ ++ TARGET_OTHER_LEVEL, // Paper ++ /** ++ * When the target is in creative or spectator gamemode, or the difficulty is peaceful, or other reasons ++ */ ++ TARGET_INVALID, // Paper + /** + * A currently unknown reason for the entity changing target. + */ -- cgit v1.2.3