mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
42 lines
2.0 KiB
Diff
42 lines
2.0 KiB
Diff
From 299391072b30918e1560767e8bbdc5e6746e6b10 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 19 Oct 2019 02:35:35 -0500
|
|
Subject: [PATCH] Add getPlayer to SkeletonHorseTrapEvent
|
|
|
|
---
|
|
.../java/net/minecraft/server/PathfinderGoalHorseTrap.java | 7 ++++---
|
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
index 37626f925f..f8fd2d99cc 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
@@ -2,7 +2,8 @@ package net.minecraft.server;
|
|
|
|
public class PathfinderGoalHorseTrap extends PathfinderGoal {
|
|
|
|
- private final EntityHorseSkeleton a;
|
|
+ private final EntityHorseSkeleton a; public EntityHorseSkeleton getHorse() { return a; } // Purpur - OBFHELPER
|
|
+ private EntityHuman player; // Purpur
|
|
|
|
public PathfinderGoalHorseTrap(EntityHorseSkeleton entityhorseskeleton) {
|
|
this.a = entityhorseskeleton;
|
|
@@ -10,12 +11,12 @@ public class PathfinderGoalHorseTrap extends PathfinderGoal {
|
|
|
|
@Override
|
|
public boolean a() {
|
|
- return this.a.world.isPlayerNearby(this.a.locX(), this.a.locY(), this.a.locZ(), 10.0D);
|
|
+ return (player = getHorse().world.findNearbyPlayer(getHorse(), 10.0D)) != null; // Purpur
|
|
}
|
|
|
|
@Override
|
|
public void e() {
|
|
- if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.a.getBukkitEntity()).callEvent()) return; // Paper
|
|
+ if (!new com.destroystokyo.paper.event.entity.SkeletonHorseTrapEvent((org.bukkit.entity.SkeletonHorse) this.a.getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity()).callEvent()) return; // Paper // Purpur
|
|
DifficultyDamageScaler difficultydamagescaler = this.a.world.getDamageScaler(new BlockPosition(this.a));
|
|
|
|
this.a.r(false);
|
|
--
|
|
2.24.0
|
|
|