mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: fcbeac8a [CI-SKIP] Readme update (#3702) 824f8086 Bandaid italic legacy serialization #3757 (#3760) Tuinity Changes: 9f21359: Re-add optimise collision checking in player move packet handling 1152054: Revert player move packet optimisation ef0a6c4: Optimise collision checking in player move packets
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 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] SkeletonHorseTrapEvent#getPlayer
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseTrap.java
|
|
index b37e4aa37..4d8c4ac07 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(this.a.getChunkCoordinates());
|
|
|
|
this.a.t(false);
|