From 4ca1f899071572fbd5d89fe52aeaeec1e474e920 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 1 Mar 2016 21:08:40 +0000 Subject: [PATCH] Manually calculate horses' jump power due to horse jumping being moved clientside --- nms-patches/EntityHorse.patch | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nms-patches/EntityHorse.patch b/nms-patches/EntityHorse.patch index db8f0aad9c..39e03b089c 100644 --- a/nms-patches/EntityHorse.patch +++ b/nms-patches/EntityHorse.patch @@ -99,12 +99,18 @@ AttributeInstance attributeinstance = this.getAttributeMap().a("Speed"); if (attributeinstance != null) { -@@ -1145,6 +1168,12 @@ +@@ -1145,6 +1168,18 @@ } public void b(int i) { + // CraftBukkit start -+ org.bukkit.event.entity.HorseJumpEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callHorseJumpEvent(this, this.jumpPower); ++ float power; ++ if (i >= 90) { ++ power = 1.0F; ++ } else { ++ power = 0.4F + 0.4F * (float) i / 90.0F; ++ } ++ org.bukkit.event.entity.HorseJumpEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callHorseJumpEvent(this, power); + if (event.isCancelled()) { + return; + }