mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: df0d7b0d Update upstream CB 6ea3c2cf [CI-SKIP] Rebuild patches d7bed4cb Heavily optimise random block ticking (#2914) b66d9ff8 Update upstream CB ba71c5d6 Stop stripping private use block Unicode from signs 28d9dcfc Entity Jump API (#1587) 9976a768 Fix PlayerNaturallySpawnCreaturesEvent boolean inversion 054e20da Clean up imports on ThrownEggHatchEvent a8984ccb Add ThrownEggHatchEvent (#1982) 9f24d495 Allow nerfed blazes, endermen to take water damage (#2847)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From 2d93ecf31a99b2ed16069baaa2a665076e8884cd Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 18 May 2019 16:59:52 -0500
|
||||
Subject: [PATCH] Phantoms do not spawn on creative players
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/MobSpawnerPhantom.java | 2 +-
|
||||
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
index f488c22ed..748983da2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
@@ -31,7 +31,7 @@ public class MobSpawnerPhantom {
|
||||
while (iterator.hasNext()) {
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
- if (!entityhuman.isSpectator()) {
|
||||
+ if (!entityhuman.isSpectator() && (!worldserver.purpurConfig.phantomIgnoreCreative || !entityhuman.isCreative())) { // Purpur
|
||||
BlockPosition blockposition = new BlockPosition(entityhuman);
|
||||
|
||||
if (!worldserver.worldProvider.f() || blockposition.getY() >= worldserver.getSeaLevel() && worldserver.f(blockposition)) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index cd3b29ef1..9e89eafb8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -387,11 +387,13 @@ public class PurpurWorldConfig {
|
||||
public boolean phantomRidableInWater = false;
|
||||
public boolean phantomRequireShiftToMount = true;
|
||||
public double phantomMaxY = 256D;
|
||||
+ public boolean phantomIgnoreCreative = false;
|
||||
private void phantomSettings() {
|
||||
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
|
||||
phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
|
||||
phantomRequireShiftToMount = getBoolean("mobs.phantom.require-shift-to-mount", phantomRequireShiftToMount);
|
||||
phantomMaxY = getDouble("mobs.phantom.ridable-max-y", phantomMaxY);
|
||||
+ phantomIgnoreCreative = getBoolean("mobs.phantom.do-not-spawn-on-creative-players", phantomIgnoreCreative);
|
||||
}
|
||||
|
||||
public boolean pigRidable = false;
|
||||
--
|
||||
2.24.0
|
||||
|
||||
Reference in New Issue
Block a user