diff --git a/patches/api/Change-EnderEye-target-without-changing-other-things.patch b/patches/api/Change-EnderEye-target-without-changing-other-things.patch new file mode 100644 index 0000000000..c51a982903 --- /dev/null +++ b/patches/api/Change-EnderEye-target-without-changing-other-things.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Sat, 21 Aug 2021 12:14:00 -0700 +Subject: [PATCH] Change EnderEye target without changing other things + + +diff --git a/src/main/java/org/bukkit/entity/EnderSignal.java b/src/main/java/org/bukkit/entity/EnderSignal.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/EnderSignal.java ++++ b/src/main/java/org/bukkit/entity/EnderSignal.java +@@ -0,0 +0,0 @@ public interface EnderSignal extends Entity { + */ + public void setTargetLocation(@NotNull Location location); + ++ // Paper start ++ /** ++ * Set the {@link Location} this EnderSignal is moving towards. ++ * ++ * @param location the new target location ++ * @param update true to reset the {@link #getDropItem()} ++ * to a random value and {@link #getDespawnTimer()} to 0 ++ */ ++ public void setTargetLocation(@NotNull Location location, boolean update); ++ // Paper end ++ + /** + * Gets if the EnderSignal should drop an item on death.
+ * If {@code true}, it will drop an item. If {@code false}, it will shatter. diff --git a/patches/server/Change-EnderEye-target-without-changing-other-things.patch b/patches/server/Change-EnderEye-target-without-changing-other-things.patch new file mode 100644 index 0000000000..c944f54457 --- /dev/null +++ b/patches/server/Change-EnderEye-target-without-changing-other-things.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Sat, 21 Aug 2021 12:13:53 -0700 +Subject: [PATCH] Change EnderEye target without changing other things + + +diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java +@@ -0,0 +0,0 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + } + + public void signalTo(BlockPos pos) { ++ // Paper start ++ this.signalTo(pos, true); ++ } ++ public void signalTo(BlockPos pos, boolean update) { ++ // Paper end + double d0 = (double) pos.getX(); + int i = pos.getY(); + double d1 = (double) pos.getZ(); +@@ -0,0 +0,0 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + this.tz = d1; + } + ++ if (update) { // Paper + this.life = 0; + this.surviveAfterDeath = this.random.nextInt(5) > 0; ++ } // Paper + } + + @Override +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java +@@ -0,0 +0,0 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal { + + @Override + public void setTargetLocation(Location location) { ++ // Paper start ++ this.setTargetLocation(location, true); ++ } ++ ++ @Override ++ public void setTargetLocation(Location location, boolean update) { ++ // Paper end + Preconditions.checkArgument(getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds"); +- this.getHandle().signalTo(new BlockPos(location.getX(), location.getY(), location.getZ())); ++ this.getHandle().signalTo(new BlockPos(location.getX(), location.getY(), location.getZ()), update); // Paper + } + + @Override