mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Prevent phantoms spawning on creative players
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
From bae208ea787e6f17f41f80ffa6a03ba15b860708 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] Prevent phantoms spawning on creative players
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/MobSpawnerPhantom.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
index 1818e7c38..43df35a44 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
|
||||
@@ -29,7 +29,7 @@ public class MobSpawnerPhantom {
|
||||
while (iterator.hasNext()) {
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
- if (!entityhuman.isSpectator()) {
|
||||
+ if (!entityhuman.isSpectator() && !entityhuman.isCreative()) { // Purpur
|
||||
BlockPosition blockposition = new BlockPosition(entityhuman);
|
||||
|
||||
if (!worldserver.worldProvider.g() || blockposition.getY() >= worldserver.getSeaLevel() && worldserver.f(blockposition)) {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user