From f09f7d8754bf092de72faef32459674b9f07cfae Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 17 Mar 2016 15:00:24 -0400 Subject: [PATCH] Implement SpectralArrow#getGlowingTicks and SpectralArrow#setGlowingTicks(int) --- nms-patches/EntitySpectralArrow.patch | 11 +++++++++++ .../bukkit/craftbukkit/entity/CraftSpectralArrow.java | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 nms-patches/EntitySpectralArrow.patch diff --git a/nms-patches/EntitySpectralArrow.patch b/nms-patches/EntitySpectralArrow.patch new file mode 100644 index 000000000..9e1d5b0aa --- /dev/null +++ b/nms-patches/EntitySpectralArrow.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/EntitySpectralArrow.java ++++ b/net/minecraft/server/EntitySpectralArrow.java +@@ -2,7 +2,7 @@ + + public class EntitySpectralArrow extends EntityArrow { + +- private int f = 200; ++ public int f = 200; // PAIL: private to public + + public EntitySpectralArrow(World world) { + super(world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java index c1cab93e0..f2f28a0a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java @@ -25,4 +25,14 @@ public class CraftSpectralArrow extends CraftArrow implements SpectralArrow { public EntityType getType() { return EntityType.SPECTRAL_ARROW; } + + @Override + public int getGlowingTicks() { + return getHandle().f; // PAIL: Rename glowingDuration + } + + @Override + public void setGlowingTicks(int duration) { + getHandle().f = duration; + } }