diff --git a/build-data/paper.at b/build-data/paper.at index c57689418b..935d4f45f2 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -324,3 +324,6 @@ protected net.minecraft.world.entity.projectile.Projectile hitCancelled # Expose firework item directly + manually setting flight ticks public net.minecraft.world.entity.projectile.FireworkRocketEntity life + +# More Projectile API +public net.minecraft.world.entity.projectile.FishingHook timeUntilLured diff --git a/patches/api/More-Projectile-API.patch b/patches/api/More-Projectile-API.patch index b9e4d3b0ea..516024adc2 100644 --- a/patches/api/More-Projectile-API.patch +++ b/patches/api/More-Projectile-API.patch @@ -70,6 +70,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + void setTicksToDetonate(int ticks); + // Paper stop } +diff --git a/src/main/java/org/bukkit/entity/FishHook.java b/src/main/java/org/bukkit/entity/FishHook.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/entity/FishHook.java ++++ b/src/main/java/org/bukkit/entity/FishHook.java +@@ -0,0 +0,0 @@ public interface FishHook extends Projectile { + */ + BOBBING; + } ++ ++ // Paper start - More FishHook API ++ /** ++ * Get the number of ticks the hook needs to wait for a fish to bite. ++ * ++ * @return Number of ticks ++ */ ++ int getWaitTime(); ++ ++ /** ++ * Sets the number of ticks the hook needs to wait for a fish to bite. ++ * ++ * @param ticks Number of ticks ++ */ ++ void setWaitTime(int ticks); ++ // Paper end + } diff --git a/src/main/java/org/bukkit/entity/ThrownPotion.java b/src/main/java/org/bukkit/entity/ThrownPotion.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/ThrownPotion.java diff --git a/patches/server/More-Projectile-API.patch b/patches/server/More-Projectile-API.patch index ac56713421..a16f02dfdd 100644 --- a/patches/server/More-Projectile-API.patch +++ b/patches/server/More-Projectile-API.patch @@ -111,6 +111,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - Expose firework item directly + manually setting flight } +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +@@ -0,0 +0,0 @@ public class CraftFishHook extends CraftProjectile implements FishHook { + public HookState getState() { + return HookState.values()[this.getHandle().currentState.ordinal()]; + } ++ // Paper start - More FishHook API ++ @Override ++ public int getWaitTime() { ++ return this.getHandle().timeUntilLured; ++ } ++ ++ @Override ++ public void setWaitTime(int ticks) { ++ this.getHandle().timeUntilLured = ticks; ++ } ++ // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java