mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Merge in Tuinity patches
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From fc44f4c1004b78d3af6a818a523426bd38d64386 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 cc8e832b3..392936c34 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -390,11 +390,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