mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Move timings changes to its own patch
This commit is contained in:
26
patches/server/0098-Fix-a-possible-NPE-for-lukeeexd.patch
Normal file
26
patches/server/0098-Fix-a-possible-NPE-for-lukeeexd.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From e73d5d6a8519d763d801f66c0bb7098e83dafdbd Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:09:30 -0600
|
||||
Subject: [PATCH] Fix a possible NPE for lukeeexd
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EntityPhantom.java | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
index 9cae8885d2..8d22fd2f50 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
@@ -474,7 +474,8 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
|
||||
private void g() {
|
||||
- EntityPhantom.this.d = (new BlockPosition(EntityPhantom.this.getGoalTarget())).up(20 + EntityPhantom.this.random.nextInt(20));
|
||||
+ EntityLiving target = EntityPhantom.this.getGoalTarget(); if (target == null) return; // Purpur - this _shouldn't_ be needed at all...
|
||||
+ EntityPhantom.this.d = (new BlockPosition(target)).up(20 + EntityPhantom.this.random.nextInt(20)); // Purpur
|
||||
if (EntityPhantom.this.d.getY() < EntityPhantom.this.world.getSeaLevel()) {
|
||||
EntityPhantom.this.d = new BlockPosition(EntityPhantom.this.d.getX(), EntityPhantom.this.world.getSeaLevel() + 1, EntityPhantom.this.d.getZ());
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
||||
Reference in New Issue
Block a user