diff options
author | md_5 <git@md-5.net> | 2017-05-14 12:00:00 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-05-14 12:00:00 +1000 |
commit | 5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5 (patch) | |
tree | 0314ba59f51141bb5e0e7ff6ca7723d168ac94b9 /nms-patches/PathfinderGoalTempt.patch | |
parent | 6e3cec8bc78269d72ef7ef49ce82a5eadfb9615a (diff) | |
download | craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.gz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.lz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.tar.xz craftbukkit-5195487ec6c01a80e3a2fca8c4acfc6b9524fcf5.zip |
Update to Minecraft 1.12-pre2
Diffstat (limited to 'nms-patches/PathfinderGoalTempt.patch')
-rw-r--r-- | nms-patches/PathfinderGoalTempt.patch | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/nms-patches/PathfinderGoalTempt.patch b/nms-patches/PathfinderGoalTempt.patch index df8f4dcb..e0574094 100644 --- a/nms-patches/PathfinderGoalTempt.patch +++ b/nms-patches/PathfinderGoalTempt.patch @@ -17,25 +17,24 @@ private double e; private double f; private double g; -- private EntityHuman h; -+ private EntityLiving h; // CraftBukkit +- private EntityHuman target; ++ private EntityLiving target; // CraftBukkit private int i; private boolean j; private final Set<Item> k; -@@ -39,7 +45,18 @@ +@@ -39,7 +45,17 @@ return false; } else { - this.h = this.a.world.findNearbyPlayer(this.a, 10.0D); -- return this.h == null ? false : this.a(this.h.getItemInMainHand()) || this.a(this.h.getItemInOffHand()); + this.target = this.a.world.findNearbyPlayer(this.a, 10.0D); +- return this.target == null ? false : this.a(this.target.getItemInMainHand()) || this.a(this.target.getItemInOffHand()); + // CraftBukkit start -+ // PAIL: rename -+ boolean tempt = this.h == null ? false : this.a(this.h.getItemInMainHand()) || this.a(this.h.getItemInOffHand()); ++ boolean tempt = this.target == null ? false : this.a(this.target.getItemInMainHand()) || this.a(this.target.getItemInOffHand()); + if (tempt) { -+ EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(this.a, this.h, EntityTargetEvent.TargetReason.TEMPT); ++ EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(this.a, this.target, EntityTargetEvent.TargetReason.TEMPT); + if (event.isCancelled()) { + return false; + } -+ this.h = ((CraftLivingEntity) event.getTarget()).getHandle(); ++ this.target = ((CraftLivingEntity) event.getTarget()).getHandle(); + } + return tempt; + // CraftBukkit end |