mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Remove some patches and fix natural spawn issues
This commit is contained in:
@@ -35,16 +35,6 @@ verbose
|
||||
* **default**: false
|
||||
* **description**: Sets whether the server should dump all configuration values to the server log on startup.
|
||||
|
||||
enable-tick-overload
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: false
|
||||
* **description**: Enable/disable the vanilla tick overload detection ("Can't keep up! Is the server overloaded?")
|
||||
|
||||
enable-tps-catchup
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
* **default**: false
|
||||
* **description**: Enable/disable Spigot's TPS catchup (makes everything tick faster than 20 tps after lag spikes, which can cause more lag - also skews /tps reports by ruining the average with above 20 tps entries)
|
||||
|
||||
lagging-threshold:
|
||||
* **default**: 19.0
|
||||
* **description**: Purpur keeps track of when it is lagging in order to have the ability to change behaviors accordingly. This value is that threshold when you want to consider the server to be lagging. Right now this is only used for mob.villager.brain-ticks setting.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From b27bc98e22f0c21525465d23a6c0ef7e727a9d5e Mon Sep 17 00:00:00 2001
|
||||
From 4f0ade4ca03aa897cb0667065159ac29297453fb Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 12 May 2019 00:43:12 -0500
|
||||
Subject: [PATCH] Make giants naturally spawn and have AI
|
||||
@@ -7,8 +7,9 @@ Subject: [PATCH] Make giants naturally spawn and have AI
|
||||
.../java/net/minecraft/server/BiomeBase.java | 1 +
|
||||
.../java/net/minecraft/server/Biomes.java | 25 ++++++++++++++++
|
||||
.../minecraft/server/EntityGiantZombie.java | 30 +++++++++++++++++--
|
||||
.../net/minecraft/server/SpawnerCreature.java | 8 +++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 7 +++++
|
||||
4 files changed, 61 insertions(+), 2 deletions(-)
|
||||
5 files changed, 69 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index a86ece8344..fbbb3b7c51 100644
|
||||
@@ -101,6 +102,25 @@ index 29e7639ad6..e69e7a456d 100644
|
||||
+ return super.a(blockposition, iworldreader); // Purpur - fix light requirements for natural spawns
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 5e6559df0b..2d4ea99f16 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -78,6 +78,14 @@ public final class SpawnerCreature {
|
||||
if (biomebase_biomemeta.b.e() != EnumCreatureType.MISC && (biomebase_biomemeta.b.d() || d0 <= 16384.0D)) {
|
||||
EntityTypes<?> entitytypes = biomebase_biomemeta.b;
|
||||
|
||||
+ // Purpur start
|
||||
+ if (entitytypes == EntityTypes.GIANT) {
|
||||
+ if (!net.pl3x.purpur.PurpurConfig.giantsNaturallySpawn) {
|
||||
+ return amountSpawned;
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
if (entitytypes.b() && a(chunkgenerator, enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) {
|
||||
EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(entitytypes);
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 2b67041f45..ad807268c9 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From a0a4abaa7e4b3ee773d5ed33d845fc743dbdf541 Mon Sep 17 00:00:00 2001
|
||||
From 0dadc82e89e4d910e53652e5aee29708940477e0 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 23 May 2019 16:20:21 -0500
|
||||
Subject: [PATCH] Campfires should fall with gravity
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] Campfires should fall with gravity
|
||||
3 files changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 8e16162a7..47a3ddd7f 100644
|
||||
index 36c84d75e2..f9747fb18d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -375,6 +375,7 @@ public class Block implements IMaterial {
|
||||
@@ -22,7 +22,7 @@ index 8e16162a7..47a3ddd7f 100644
|
||||
return 10;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
index 5cbe8e68e..eca3487b0 100644
|
||||
index bfac5835c4..d2363d1d2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
@@ -72,8 +72,32 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
@@ -68,7 +68,7 @@ index 5cbe8e68e..eca3487b0 100644
|
||||
|
||||
if (flag) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index cea2bcad5..dc2da586e 100644
|
||||
index cea2bcad5a..dc2da586e7 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -61,6 +61,11 @@ public class PurpurWorldConfig {
|
||||
@@ -1,81 +0,0 @@
|
||||
From 3a5b1a6a3ccfa7c91eafd9f0bec09662aa5a16ba Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 22 May 2019 22:30:08 -0500
|
||||
Subject: [PATCH] Tick loop config options
|
||||
|
||||
---
|
||||
.../net/minecraft/server/MinecraftServer.java | 31 +++++++++++++------
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 7 +++++
|
||||
2 files changed, 28 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 57a1ab8b9e..d5a9a5f069 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -878,16 +878,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
lastTick = start - TICK_TIME; // Paper
|
||||
while (this.isRunning) {
|
||||
- long i = ((curTime = System.nanoTime()) / (1000L * 1000L)) - this.nextTick; // Paper
|
||||
-
|
||||
- if (i > 5000L && this.nextTick - this.lastOverloadTime >= 30000L) { // CraftBukkit
|
||||
- long j = i / 50L;
|
||||
-
|
||||
- if (server.getWarnOnOverload()) // CraftBukkit
|
||||
- MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
|
||||
- this.nextTick += j * 50L;
|
||||
- this.lastOverloadTime = this.nextTick;
|
||||
+ // Purpur start - tick overload
|
||||
+ curTime = System.nanoTime();
|
||||
+ if (net.pl3x.purpur.PurpurConfig.enableTickOverload) {
|
||||
+ long i = ((curTime) / (1000L * 1000L)) - this.nextTick; // Paper
|
||||
+
|
||||
+ if (i > 5000L && this.nextTick - this.lastOverloadTime >= 30000L) { // CraftBukkit
|
||||
+ long j = i / 50L;
|
||||
+
|
||||
+ if (server.getWarnOnOverload()) // CraftBukkit
|
||||
+ MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
|
||||
+ this.nextTick += j * 50L;
|
||||
+ this.lastOverloadTime = this.nextTick;
|
||||
+ }
|
||||
}
|
||||
+ // Purpur end - tick overload
|
||||
|
||||
if ( ++MinecraftServer.currentTick % SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
@@ -918,7 +923,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.a(this::canSleepForTick);
|
||||
this.methodProfiler.exitEnter("nextTickWait");
|
||||
this.ac = true;
|
||||
- this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
||||
+ // Purpur start - tps catchup
|
||||
+ if (net.pl3x.purpur.PurpurConfig.enableTPSCatchup) {
|
||||
+ this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
||||
+ } else {
|
||||
+ this.ab = this.nextTick = curTime / 1000000L + 50L;
|
||||
+ }
|
||||
+ // Purpur end - tps catchup
|
||||
this.sleepForTick();
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.b();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index a02b1c2667..4d0d7a9dad 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -131,6 +131,13 @@ public class PurpurConfig {
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
|
||||
+ public static boolean enableTickOverload = false;
|
||||
+ public static boolean enableTPSCatchup = false;
|
||||
+ private static void tickLoopSettings() {
|
||||
+ enableTickOverload = getBoolean("settings.enable-tick-overload", enableTickOverload);
|
||||
+ enableTPSCatchup = getBoolean("settings.enable-tps-catchup", enableTPSCatchup);
|
||||
+ }
|
||||
+
|
||||
public static boolean requireShiftToMount = true;
|
||||
private static void requireShiftToMount() {
|
||||
requireShiftToMount = getBoolean("settings.mobs.require-shift-to-mount", requireShiftToMount);
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 577d81729195cc19c5f0104fab3afb4ff001f3d2 Mon Sep 17 00:00:00 2001
|
||||
From 0cdd904a8785ee74ecca1c86bf908dd312b058da Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 23 May 2019 21:50:37 -0500
|
||||
Subject: [PATCH] Packed Barrels
|
||||
@@ -40,7 +40,7 @@ index 5d80ec8010..dd8c6e8876 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index c58931392a..fa89e29652 100644
|
||||
index ad807268c9..b59707dd78 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -6,6 +6,7 @@ import org.bukkit.Bukkit;
|
||||
@@ -51,7 +51,7 @@ index c58931392a..fa89e29652 100644
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -171,6 +172,12 @@ public class PurpurConfig {
|
||||
@@ -164,6 +165,12 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From e1cb4d184b4548f4895327d7cb1ce9aef6904eaf Mon Sep 17 00:00:00 2001
|
||||
From d3ac2ab0ac6e0054d8a0c2fbcf36128e89eb223c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 24 May 2019 02:39:25 -0500
|
||||
Subject: [PATCH] Right click to open sign editor
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Right click to open sign editor
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
|
||||
index b6d7689d5..746709025 100644
|
||||
index e058a85ba6..b1e0e9435f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSign.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSign.java
|
||||
@@ -52,6 +52,16 @@ public abstract class BlockSign extends BlockTileEntity implements IBlockWaterlo
|
||||
@@ -30,7 +30,7 @@ index b6d7689d5..746709025 100644
|
||||
} else {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 6e6d6defd..7f996591f 100644
|
||||
index dc2da586e7..ee92fd26e6 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -61,6 +61,11 @@ public class PurpurWorldConfig {
|
||||
@@ -1,4 +1,4 @@
|
||||
From c488ed44e41728d9dc7187efbc5d16abfa2235da Mon Sep 17 00:00:00 2001
|
||||
From 35209216787f90f9b5378c441c16d8ff7b10a42c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 26 May 2019 15:19:14 -0500
|
||||
Subject: [PATCH] Bring back server name
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Bring back server name
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
index fb092a941..54c0b4247 100644
|
||||
index 0c3ec83570..20c143e314 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
@@ -10,6 +10,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
||||
@@ -21,7 +21,7 @@ index fb092a941..54c0b4247 100644
|
||||
public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true);
|
||||
public final boolean pvp = this.getBoolean("pvp", true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ae290996d..875c16688 100644
|
||||
index 3fea9de67a..34a6d26a2a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2164,4 +2164,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3db95c119f25660486d19e952c5404130ffa6d2c Mon Sep 17 00:00:00 2001
|
||||
From ce582c4dd08f5a14735aece2c8fc6ee6baa194ec Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 29 May 2019 23:39:04 -0500
|
||||
Subject: [PATCH] Add village raid spawn reason
|
||||
@@ -1,4 +1,4 @@
|
||||
From c65db504cbfde1595c4665f0118f9362ec5a2bb9 Mon Sep 17 00:00:00 2001
|
||||
From 4b4c998f0f0fda79a87c37d2a65a5168b2917293 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 31 May 2019 21:24:33 -0500
|
||||
Subject: [PATCH] Advancement API Additions
|
||||
@@ -13,7 +13,7 @@ Subject: [PATCH] Advancement API Additions
|
||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Advancement.java b/src/main/java/net/minecraft/server/Advancement.java
|
||||
index 3ef2f4d2a..ac4c29f2b 100644
|
||||
index 3ef2f4d2ac..ac4c29f2b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Advancement.java
|
||||
+++ b/src/main/java/net/minecraft/server/Advancement.java
|
||||
@@ -20,7 +20,7 @@ import org.apache.commons.lang3.ArrayUtils;
|
||||
@@ -26,7 +26,7 @@ index 3ef2f4d2a..ac4c29f2b 100644
|
||||
private final MinecraftKey d;
|
||||
private final Map<String, Criterion> e;
|
||||
diff --git a/src/main/java/net/minecraft/server/AdvancementDisplay.java b/src/main/java/net/minecraft/server/AdvancementDisplay.java
|
||||
index e8172d56f..dc6a0448d 100644
|
||||
index e8172d56fe..dc6a0448d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/AdvancementDisplay.java
|
||||
+++ b/src/main/java/net/minecraft/server/AdvancementDisplay.java
|
||||
@@ -20,6 +20,7 @@ public class AdvancementDisplay {
|
||||
@@ -66,7 +66,7 @@ index e8172d56f..dc6a0448d 100644
|
||||
return this.h;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/AdvancementFrameType.java b/src/main/java/net/minecraft/server/AdvancementFrameType.java
|
||||
index a9c49a434..14a35ba4c 100644
|
||||
index a9c49a4348..14a35ba4c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/AdvancementFrameType.java
|
||||
+++ b/src/main/java/net/minecraft/server/AdvancementFrameType.java
|
||||
@@ -1,14 +1,22 @@
|
||||
@@ -96,7 +96,7 @@ index a9c49a434..14a35ba4c 100644
|
||||
this.e = i;
|
||||
this.f = enumchatformat;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
index a5aadf285..36da44414 100644
|
||||
index a5aadf2850..36da444145 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
@@ -4,6 +4,7 @@ import java.util.Collection;
|
||||
@@ -119,7 +119,7 @@ index a5aadf285..36da44414 100644
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
|
||||
new file mode 100644
|
||||
index 000000000..aed74fb18
|
||||
index 0000000000..aed74fb180
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
|
||||
@@ -0,0 +1,43 @@
|
||||
@@ -1,4 +1,4 @@
|
||||
From e532d05cd56e22ed4d6a12bde3afa56ccb254e14 Mon Sep 17 00:00:00 2001
|
||||
From 7795c0a11b772848111790b97c8ed01531798ce5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 1 Jun 2019 01:16:35 -0500
|
||||
Subject: [PATCH] Always place dragon egg when dragon is killed
|
||||
@@ -31,10 +31,10 @@ index 6700c8c658..f0c77eb6c1 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index fa89e29652..27eca5246c 100644
|
||||
index b59707dd78..56cf939622 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -178,6 +178,11 @@ public class PurpurConfig {
|
||||
@@ -171,6 +171,11 @@ public class PurpurConfig {
|
||||
InventoryType.BARREL.setDefaultSize(packedBarrels ? 54 : 27);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c712eb4900aab7f3c00cacee7465b1d442fa2298 Mon Sep 17 00:00:00 2001
|
||||
From c1e11502eceaeaa6098d1452beadf708faa8938f Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 4 Jun 2019 15:50:08 -0500
|
||||
Subject: [PATCH] Fix 'outdated server' showing in ping before server fully
|
||||
@@ -1,4 +1,4 @@
|
||||
From c5e3285175b82ce3c644da4269b6c65ca161db14 Mon Sep 17 00:00:00 2001
|
||||
From 672cd6a191a770c610a9f83f3bddbc3cbcb6484a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 17:40:30 -0500
|
||||
Subject: [PATCH] Allow color codes on signs
|
||||
@@ -23,7 +23,7 @@ index 18695d9b5c..8c59692b2b 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 9cf6cc53f4..3869cdeeb6 100644
|
||||
index e7b8b2e992..520490d59c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2561,6 +2561,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1,25 +0,0 @@
|
||||
From 02de5da64c505229d1928fd4a429f75c1940f562 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 2 Jun 2019 02:36:59 -0500
|
||||
Subject: [PATCH] Dont spaz out startup on custom world generators
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/WorldData.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java
|
||||
index ca4c314589..610637b46e 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldData.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldData.java
|
||||
@@ -299,7 +299,7 @@ public class WorldData {
|
||||
this.a(worldsettings);
|
||||
this.levelName = s;
|
||||
this.F = WorldData.a;
|
||||
- this.E = false;
|
||||
+ this.E = true; // Purpur
|
||||
}
|
||||
|
||||
public void a(WorldSettings worldsettings) {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7a219781d500be21e684c902ea24fb0b97a3697c Mon Sep 17 00:00:00 2001
|
||||
From c00fcef8b67b52528798bb570efabead900d98a3 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 21:30:49 -0500
|
||||
Subject: [PATCH] Campfires burn out in rain
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Campfires burn out in rain
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCampfire.java b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
index eca3487b0..d787fa006 100644
|
||||
index d2363d1d2d..563f16a3f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCampfire.java
|
||||
@@ -86,6 +86,9 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged
|
||||
@@ -23,7 +23,7 @@ index eca3487b0..d787fa006 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 1238864e7..f090f76a1 100644
|
||||
index 1238864e7c..f090f76a14 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -92,6 +92,11 @@ public class PurpurWorldConfig {
|
||||
@@ -1,4 +1,4 @@
|
||||
From f2c0268badfcffd1e43a9fba97f02b4401c04173 Mon Sep 17 00:00:00 2001
|
||||
From f6595ba9e54c438350ceac264246034945fb649e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 22:15:46 -0500
|
||||
Subject: [PATCH] Add config for items breaking turtle eggs
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Add config for items breaking turtle eggs
|
||||
2 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTurtleEgg.java b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
index fd91785bfe..5bb645eb9c 100644
|
||||
index 0118a84510..83e69425bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
@@ -163,6 +163,17 @@ public class BlockTurtleEgg extends Block {
|
||||
@@ -32,7 +32,7 @@ index fd91785bfe..5bb645eb9c 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 7f1c3ccb6c..a649a4c359 100644
|
||||
index f090f76a14..9dfba251ea 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -101,4 +101,9 @@ public class PurpurWorldConfig {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0d54d19e633cb87e2098663ac8426a26bc1aacbd Mon Sep 17 00:00:00 2001
|
||||
From 7d1f47edd80036913c7de5aab3b916ef373d783d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 6 Jun 2019 23:23:52 -0500
|
||||
Subject: [PATCH] Block and Fluid Tick Events
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] Block and Fluid Tick Events
|
||||
3 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b8e964c974..5d319d1371 100644
|
||||
index 451ad4f32b..cfcee654d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -451,13 +451,13 @@ public class WorldServer extends World {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 72cadce1c45bf749bc8187032fb964df60ccb4ea Mon Sep 17 00:00:00 2001
|
||||
From 24d991c41120c1bb5aeeb732337fdb28d924534c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 15 Jun 2019 03:12:15 -0500
|
||||
Subject: [PATCH] Make Iron Golems Swim
|
||||
@@ -21,10 +21,10 @@ index 2c34ab337a..9bb033336c 100644
|
||||
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true));
|
||||
this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 27eca5246c..9a9935edbc 100644
|
||||
index 56cf939622..cd9805e5fb 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -156,6 +156,11 @@ public class PurpurConfig {
|
||||
@@ -149,6 +149,11 @@ public class PurpurConfig {
|
||||
giantsHaveAI = getBoolean("settings.mobs.giant.have-ai", giantsHaveAI);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 285bf7aad89ef56a3045937502413cab3a816eee Mon Sep 17 00:00:00 2001
|
||||
From 846ad89741fbfde6234139c5d4fbe0df91006d71 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 20 Jun 2019 18:48:58 -0500
|
||||
Subject: [PATCH] Phantoms spawn naturally in the end
|
||||
@@ -6,9 +6,9 @@ Subject: [PATCH] Phantoms spawn naturally in the end
|
||||
---
|
||||
.../server/BiomeTheEndHighIsland.java | 3 ++-
|
||||
.../net/minecraft/server/EntityPhantom.java | 19 +++++++++++++++++++
|
||||
.../net/minecraft/server/SpawnerCreature.java | 9 +++++++++
|
||||
.../net/minecraft/server/SpawnerCreature.java | 5 +++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 2 ++
|
||||
4 files changed, 32 insertions(+), 1 deletion(-)
|
||||
4 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java b/src/main/java/net/minecraft/server/BiomeTheEndHighIsland.java
|
||||
index e8cf6153ec..82f3a9a95f 100644
|
||||
@@ -72,30 +72,26 @@ index 69a1c79e74..2fada230bc 100644
|
||||
this.die();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 5e6559df0b..6386e7edcf 100644
|
||||
index 2d4ea99f16..ad4341cba5 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -78,6 +78,15 @@ public final class SpawnerCreature {
|
||||
if (biomebase_biomemeta.b.e() != EnumCreatureType.MISC && (biomebase_biomemeta.b.d() || d0 <= 16384.0D)) {
|
||||
EntityTypes<?> entitytypes = biomebase_biomemeta.b;
|
||||
|
||||
+ // Purpur start
|
||||
+ if (entitytypes == EntityTypes.PHANTOM) {
|
||||
@@ -83,6 +83,11 @@ public final class SpawnerCreature {
|
||||
if (!net.pl3x.purpur.PurpurConfig.giantsNaturallySpawn) {
|
||||
return amountSpawned;
|
||||
}
|
||||
+ } else if (entitytypes == EntityTypes.PHANTOM) {
|
||||
+ if (!net.pl3x.purpur.PurpurConfig.spawnPhantomsInTheEnd) {
|
||||
+ return mobsSpawned;
|
||||
+ return amountSpawned;
|
||||
+ }
|
||||
+ blockposition_mutableblockposition.y = 70 + world.random.nextInt(20);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
if (entitytypes.b() && a(chunkgenerator, enumcreaturetype, biomebase_biomemeta, (BlockPosition) blockposition_mutableblockposition)) {
|
||||
EntityPositionTypes.Surface entitypositiontypes_surface = EntityPositionTypes.a(entitytypes);
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 9a9935edbc..71138c7d52 100644
|
||||
index cd9805e5fb..e86864a5ea 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -164,10 +164,12 @@ public class PurpurConfig {
|
||||
@@ -157,10 +157,12 @@ public class PurpurConfig {
|
||||
public static double crystalsAttackPhantomsRadius = 0.0D;
|
||||
public static float crystalsAttackPhantomDamage = 1.0F;
|
||||
public static double phantomsOrbitCrystalsRadius = 0.0D;
|
||||
@@ -1,4 +1,4 @@
|
||||
From dde0a3375684de5d658a8036d3a76ff83fa110ae Mon Sep 17 00:00:00 2001
|
||||
From cec697c47523c9e43c930a0a59c6887665a7abac Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 21 Jun 2019 14:37:10 -0500
|
||||
Subject: [PATCH] Allow soil to moisten from water directly under it
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Allow soil to moisten from water directly under it
|
||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
index 30033ed885..57769c98e8 100644
|
||||
index 2fc6e210dc..54f9139014 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
|
||||
@@ -112,19 +112,14 @@ public class BlockSoil extends Block {
|
||||
@@ -40,7 +40,7 @@ index 30033ed885..57769c98e8 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 92eeaca428..9d25674e19 100644
|
||||
index 775d40ab1b..a33eb6773c 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -97,6 +97,11 @@ public class PurpurWorldConfig {
|
||||
@@ -1,4 +1,4 @@
|
||||
From eaa1d5bc0f2882e7823ea62033914a9fc94d98cd Mon Sep 17 00:00:00 2001
|
||||
From 03bbebf1ea367aa41ce48024fa950a42b93420a6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 22 Jun 2019 16:17:05 -0500
|
||||
Subject: [PATCH] Fix errors trying to spawn negative number of a mob
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Fix errors trying to spawn negative number of a mob
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 490445cefa..925efd4a15 100644
|
||||
index ad4341cba5..28dff2a03c 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -72,7 +72,10 @@ public final class SpawnerCreature {
|
||||
@@ -1,4 +1,4 @@
|
||||
From becfe4122c029779ab53f38382c48e654f5ba3d0 Mon Sep 17 00:00:00 2001
|
||||
From b8fd6025bf2ad422615a27086959e79be1d73598 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 23 Jun 2019 17:01:26 -0500
|
||||
Subject: [PATCH] Add large sized ender chests
|
||||
@@ -36,10 +36,10 @@ index fd31b9a6dc..49b369236d 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index f5e0d63536..62df497984 100644
|
||||
index e86864a5ea..0728cd1f80 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -179,6 +179,12 @@ public class PurpurConfig {
|
||||
@@ -172,6 +172,12 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5eb43efa6016e44c3796d08005ef23c79946ccc5 Mon Sep 17 00:00:00 2001
|
||||
From 19d964d3c410242ccca4a957d31046583ea7c9cb Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 29 Jun 2019 02:32:40 -0500
|
||||
Subject: [PATCH] Controllable Minecarts
|
||||
@@ -111,7 +111,7 @@ index ec96fa0a43..9ad3cc2982 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 62df497984..6704742ffa 100644
|
||||
index 0728cd1f80..a47be97a68 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -1,9 +1,13 @@
|
||||
@@ -128,7 +128,7 @@ index 62df497984..6704742ffa 100644
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
@@ -312,4 +316,30 @@ public class PurpurConfig {
|
||||
@@ -305,4 +309,30 @@ public class PurpurConfig {
|
||||
ridableZombiePigman = getBoolean("settings.ridable.zombie_pigman", ridableZombiePigman);
|
||||
ridableZombieVillager = getBoolean("settings.ridable.zombie_villager", ridableZombieVillager);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
From bcfaef046a1ad3737f886fbb6f37e9c0ec992911 Mon Sep 17 00:00:00 2001
|
||||
From 53bda3e121afed6d2547fc52dd7190603efbba3a Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 3 Jul 2019 23:58:31 -0500
|
||||
Subject: [PATCH] Disable loot drops on death by cramming
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Disable loot drops on death by cramming
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 6b8bf2d63b..a14553a799 100644
|
||||
index 8b6dd45273..aa60c00842 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1420,8 +1420,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -24,11 +24,11 @@ index 6b8bf2d63b..a14553a799 100644
|
||||
deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
|
||||
if (!deathEvent.isCancelled()) this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // Paper
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index e0077674c1..7cd70519e8 100644
|
||||
index a47be97a68..1320435da8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -143,6 +143,11 @@ public class PurpurConfig {
|
||||
enableTPSCatchup = getBoolean("settings.enable-tps-catchup", enableTPSCatchup);
|
||||
@@ -136,6 +136,11 @@ public class PurpurConfig {
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
|
||||
+ public static boolean disableDropsOnCrammingDeath = true;
|
||||
@@ -1,12 +1,13 @@
|
||||
From a6283f88383f06691c84414147b412ba0450c2e6 Mon Sep 17 00:00:00 2001
|
||||
From fd49366b6a1dac4bf110b263caf1e162749aebf5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 5 Jul 2019 11:09:25 -0500
|
||||
Subject: [PATCH] Make illusioners naturally spawn
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/Biomes.java | 18 ++++++++++++++++++
|
||||
.../net/minecraft/server/SpawnerCreature.java | 4 ++++
|
||||
.../java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
2 files changed, 23 insertions(+)
|
||||
3 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Biomes.java b/src/main/java/net/minecraft/server/Biomes.java
|
||||
index 3f7f7a2de8..38284a62b9 100644
|
||||
@@ -37,11 +38,26 @@ index 3f7f7a2de8..38284a62b9 100644
|
||||
}
|
||||
|
||||
private static void addSpawn(String biome, EnumCreatureType ct, EntityTypes et, int weight, int min_group, int max_group) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 28dff2a03c..78bed1ca7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -86,6 +86,10 @@ public final class SpawnerCreature {
|
||||
if (!net.pl3x.purpur.PurpurConfig.giantsNaturallySpawn) {
|
||||
return amountSpawned;
|
||||
}
|
||||
+ } else if (entitytypes == EntityTypes.ILLUSIONER) {
|
||||
+ if (!net.pl3x.purpur.PurpurConfig.illusionersNaturallySpawn) {
|
||||
+ return amountSpawned;
|
||||
+ }
|
||||
} else if (entitytypes == EntityTypes.PHANTOM) {
|
||||
if (!net.pl3x.purpur.PurpurConfig.spawnPhantomsInTheEnd) {
|
||||
return amountSpawned;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 7cd70519e8..bbfebfda8f 100644
|
||||
index 1320435da8..ff7c43ee0a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -165,6 +165,11 @@ public class PurpurConfig {
|
||||
@@ -158,6 +158,11 @@ public class PurpurConfig {
|
||||
giantsHaveAI = getBoolean("settings.mobs.giant.have-ai", giantsHaveAI);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 74764f2e4f4819a686edadf3b1bbda95976f61ed Mon Sep 17 00:00:00 2001
|
||||
From adb713b9984ac4183a53ba4fec145b3aeb4735fe Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 5 Jul 2019 16:36:55 -0500
|
||||
Subject: [PATCH] Implement ItemFactory#getMonsterEgg
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Implement ItemFactory#getMonsterEgg
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
index 4482dd930..bb3b0abd9 100644
|
||||
index 4482dd9309..bb3b0abd95 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
@@ -8,7 +8,7 @@ import javax.annotation.Nullable;
|
||||
@@ -22,7 +22,7 @@ index 4482dd930..bb3b0abd9 100644
|
||||
private final int c;
|
||||
private final EntityTypes<?> d;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index 80f71a77b..0dae1fcf7 100644
|
||||
index 80f71a77b7..0dae1fcf7d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -349,4 +349,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2d91e9b0c03ba642bd9cc16efdba4910160d2700 Mon Sep 17 00:00:00 2001
|
||||
From afdc74ace9d5d4200a964a1dd1616b1ed1e318a9 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 5 Jul 2019 18:21:00 -0500
|
||||
Subject: [PATCH] Implement PlayerSetSpawnerTypeWithEggEvent
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Implement PlayerSetSpawnerTypeWithEggEvent
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
index bb3b0abd9..4b77c099a 100644
|
||||
index bb3b0abd95..4b77c099aa 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemMonsterEgg.java
|
||||
@@ -2,6 +2,11 @@ package net.minecraft.server;
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3535761321b4a1ff530527e568841def7ca9c4cc Mon Sep 17 00:00:00 2001
|
||||
From f796f4ac3ddf1ca8043781ea892397d43b0d65ae Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 6 Jul 2019 17:00:04 -0500
|
||||
Subject: [PATCH] Dont send useless entity packets
|
||||
@@ -66,10 +66,10 @@ index 1a9802e755..4c5a52c802 100644
|
||||
protected boolean h;
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index bbfebfda8f..b4bd26cf5f 100644
|
||||
index ff7c43ee0a..ad6dccd4eb 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -148,6 +148,11 @@ public class PurpurConfig {
|
||||
@@ -141,6 +141,11 @@ public class PurpurConfig {
|
||||
disableDropsOnCrammingDeath = getBoolean("settings.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 78c2722560ed08cbc5e22f823b6638045ac4e414 Mon Sep 17 00:00:00 2001
|
||||
From 9f9a370094018b667bab6afd877eae76e68d8c75 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 6 Jul 2019 21:12:58 -0500
|
||||
Subject: [PATCH] Fix item position desync (MC-4)
|
||||
@@ -44,10 +44,10 @@ index 4c5a52c802..9ec3495d58 100644
|
||||
return (new Vec3D((double) i, (double) j, (double) k)).a(2.44140625E-4D);
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index b4bd26cf5f..a3197414a9 100644
|
||||
index ad6dccd4eb..5001fedb8f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -153,6 +153,11 @@ public class PurpurConfig {
|
||||
@@ -146,6 +146,11 @@ public class PurpurConfig {
|
||||
dontSendUselessEntityPackets = getBoolean("settings.dont-send-useless-entity-packets", dontSendUselessEntityPackets);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7f40cc8f40da0c4133ed7c5e4de13e406fdc6cf3 Mon Sep 17 00:00:00 2001
|
||||
From b459ce7223b5fb79421413273ccf0d26340c24e8 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Thu, 16 May 2019 01:33:46 +0100
|
||||
Subject: [PATCH] Fix MC-113809 Only grow cactus/reeds/bamboo/chorus fruit on
|
||||
@@ -74,7 +74,7 @@ index ff674a9d5b..4a13e248ed 100644
|
||||
|
||||
for (i = 1; world.getType(blockposition.down(i)).getBlock() == this; ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 5d319d1371..f780aea01a 100644
|
||||
index cfcee654d2..a9765cc9b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -452,7 +452,9 @@ public class WorldServer extends World {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 16827285653352eafdf5ae788b959cfa5a6ba5ca Mon Sep 17 00:00:00 2001
|
||||
From 07bc84f06dc6888d04e34e3de8f4da1d250948f6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 7 Jul 2019 19:52:16 -0500
|
||||
Subject: [PATCH] Add chance for zombie horse natural spawns
|
||||
@@ -38,10 +38,10 @@ index a9765cc9b0..e160b0aa59 100644
|
||||
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, flag1), org.bukkit.event.weather.LightningStrikeEvent.Cause.WEATHER); // CraftBukkit
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index e034a0f754..3860737e7b 100644
|
||||
index 5001fedb8f..9f3b383698 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -203,6 +203,11 @@ public class PurpurConfig {
|
||||
@@ -196,6 +196,11 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 30cc7ef0d3916f1d67bad78d6995c27ae8e5d562 Mon Sep 17 00:00:00 2001
|
||||
From 551b01988e94ef5e02b4a081d5d0a8a404c1ad6f Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 9 Jul 2019 20:56:47 -0500
|
||||
Subject: [PATCH] Fix pig zombies (MC-56653)
|
||||
@@ -1,4 +1,4 @@
|
||||
From c510e3b8cfac083db24028b6c4bd8f907e88658f Mon Sep 17 00:00:00 2001
|
||||
From c846d739057ad00213a29f0c0372951d30791c14 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 10 Jul 2019 20:14:07 -0500
|
||||
Subject: [PATCH] Allow leashing villagers
|
||||
@@ -1,4 +1,4 @@
|
||||
From 26bbf6c515f4af206676c24d64d14bebfd76d3e8 Mon Sep 17 00:00:00 2001
|
||||
From 5adf7a568903024ce24f3d4336992e907f7fe2ce Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 10 Jul 2019 20:43:05 -0500
|
||||
Subject: [PATCH] Option to toggle milk curing bad omen
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2568a50fe3f2535447bd74c47e81b76dd68cae83 Mon Sep 17 00:00:00 2001
|
||||
From 6a01e069f202796374341c44a0dc4f3895032d17 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 12 Jul 2019 02:10:06 -0500
|
||||
Subject: [PATCH] Implement ChunkTooLargeEvent
|
||||
@@ -1,4 +1,4 @@
|
||||
From b8edd4e6184a256af73d90f2707200022b505cd8 Mon Sep 17 00:00:00 2001
|
||||
From 514882674896290beb6547b51f9b83e4d86dff0f Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 12 Jul 2019 16:18:55 -0500
|
||||
Subject: [PATCH] Prevent entities from loading unloaded chunks
|
||||
@@ -1,4 +1,4 @@
|
||||
From acb7f96aff0481141efdff38ffeeec018fd971b7 Mon Sep 17 00:00:00 2001
|
||||
From 32a2c5dbfb7424d68f3a95cf89b5b503aa7b7d48 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 13 Jul 2019 15:56:22 -0500
|
||||
Subject: [PATCH] Tulips change fox type
|
||||
@@ -77,10 +77,10 @@ index 987297634c..eed256349d 100644
|
||||
public static final Item bd = a(Blocks.OXEYE_DAISY, CreativeModeTab.c);
|
||||
public static final Item be = a(Blocks.CORNFLOWER, CreativeModeTab.c);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index a3197414a9..8cf0d27931 100644
|
||||
index 9f3b383698..967e51722f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -168,6 +168,11 @@ public class PurpurConfig {
|
||||
@@ -161,6 +161,11 @@ public class PurpurConfig {
|
||||
feedMushroomsToCows = getInt("settings.mobs.cow.feed-mushrooms-for-mooshroom", feedMushroomsToCows);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 5e53ddfb020b762f3d0d3db4f8f8f2280c060783 Mon Sep 17 00:00:00 2001
|
||||
From 912dd7eebc0574c154d5adeea01f054847e8afc5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 14 Jul 2019 19:52:47 -0500
|
||||
Subject: [PATCH] Mending mends most damages equipment first
|
||||
@@ -58,10 +58,10 @@ index 1a98442e08..8a4eedb747 100644
|
||||
if (entry != null) {
|
||||
ItemStack itemstack = (ItemStack) entry.getValue();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 8cf0d27931..d8321e8ec3 100644
|
||||
index 967e51722f..db98610520 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -158,6 +158,11 @@ public class PurpurConfig {
|
||||
@@ -151,6 +151,11 @@ public class PurpurConfig {
|
||||
fixItemPositionDesync = getBoolean("settings.fix-item-position-desync", fixItemPositionDesync);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c68ca6c7499e4109fc8ba1cdf3a9b7611cfed7c1 Mon Sep 17 00:00:00 2001
|
||||
From 64b03313eb11a64ee7cc813970f8fe3dad1f22b9 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 13 Jul 2019 09:23:10 -0700
|
||||
Subject: [PATCH] Asynchronous chunk IO and loading
|
||||
@@ -2803,7 +2803,7 @@ index 23d1935dd5..14f8b61042 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c954cccce4..aeff82fbd4 100644
|
||||
index f7e8d2156d..f8da3a77da 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -774,6 +774,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1,4 +1,4 @@
|
||||
From 0939b74e51930c012e1fcc704187fad93980c59f Mon Sep 17 00:00:00 2001
|
||||
From 382186b874ecd84f3df0066d8d74355d6210b18b Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 19 Jul 2019 03:29:14 -0700
|
||||
Subject: [PATCH] Reduce sync loads
|
||||
@@ -275,7 +275,7 @@ index 0000000000..59aec10329
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 27c884b6e4..ed0ff8573b 100644
|
||||
index 64a899abc8..b1bea8f90d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -279,6 +279,7 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 4c2b9892be3d3a3df60c14dac35f005ecd763c91 Mon Sep 17 00:00:00 2001
|
||||
From d6f41b811080215e29fe36cb54451642d5c5aba9 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 21 Jul 2019 18:01:46 -0500
|
||||
Subject: [PATCH] Players should not cram to death
|
||||
@@ -1,4 +1,4 @@
|
||||
From 7da353e9f6f6296fde0996f119824c2ea287a493 Mon Sep 17 00:00:00 2001
|
||||
From 738e7115dfca463d7c173737df7453a6a9823013 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 21 Jul 2019 18:06:20 -0500
|
||||
Subject: [PATCH] Ladders should not bypass cramming gamerule
|
||||
@@ -1,4 +1,4 @@
|
||||
From f3cab74b82e2eb7faa7d5da4d4654318eb99abdd Mon Sep 17 00:00:00 2001
|
||||
From a75bbbdd9070da9170e40ce7dc34e36879807d8d Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 22 Jul 2019 14:24:26 -0500
|
||||
Subject: [PATCH] Implement a hard limit for pillager outpost spawns
|
||||
@@ -1,236 +0,0 @@
|
||||
From 487794d0b2e451e53ef0ddf1121a5a620c260032 Mon Sep 17 00:00:00 2001
|
||||
From: kickash32 <kickash32@gmail.com>
|
||||
Date: Tue, 11 Jun 2019 22:22:16 -0400
|
||||
Subject: [PATCH] implement optional per player mob spawns
|
||||
|
||||
---
|
||||
.../destroystokyo/paper/PaperWorldConfig.java | 5 +++
|
||||
.../minecraft/server/ChunkProviderServer.java | 16 +++++++--
|
||||
.../net/minecraft/server/EntityTypes.java | 1 +
|
||||
.../net/minecraft/server/PlayerChunkMap.java | 5 +--
|
||||
.../net/minecraft/server/SpawnerCreature.java | 21 ++++++-----
|
||||
.../net/minecraft/server/WorldServer.java | 36 +++++++++++++++++++
|
||||
6 files changed, 69 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 318a470eea..72b77e27e8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -509,6 +509,11 @@ public class PaperWorldConfig {
|
||||
maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24);
|
||||
}
|
||||
|
||||
+ public boolean perPlayerMobSpawns = false;
|
||||
+ private void perPlayerMobSpawns() {
|
||||
+ perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false);
|
||||
+ }
|
||||
+
|
||||
public boolean countAllMobsForSpawning = false;
|
||||
private void countAllMobsForSpawning() {
|
||||
countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index b1bea8f90d..d92446d79b 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -601,9 +601,21 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
// Paper start - only allow spawns upto the limit per chunk and update count afterwards
|
||||
int currEntityCount = object2intmap.getInt(enumcreaturetype);
|
||||
int difference = k1 - currEntityCount;
|
||||
+ if(this.world.paperConfig.perPlayerMobSpawns){
|
||||
+ final int[] min = {Integer.MAX_VALUE};
|
||||
+ final int finalLimit = limit;
|
||||
+ playerChunkMap.getPlayersNear(chunk.getPos())
|
||||
+ .forEach((entityplayer) -> min[0] = Math.min(
|
||||
+ finalLimit - ((WorldServer)chunk.getWorld()).getMobCountNear(entityplayer, enumcreaturetype),
|
||||
+ min[0]));
|
||||
+ difference = (min[0] == Integer.MAX_VALUE) ? 0 : min[0];
|
||||
+ }
|
||||
+
|
||||
if (difference > 0) {
|
||||
- object2intmap.put(enumcreaturetype, currEntityCount + SpawnerCreature.spawnMobs(enumcreaturetype, world, chunk, blockposition, difference));
|
||||
- // Paper end
|
||||
+ List spawned = SpawnerCreature.spawnMobs(enumcreaturetype, this.world, chunk, blockposition, difference);
|
||||
+ object2intmap.put(enumcreaturetype, currEntityCount + spawned.size());
|
||||
+ this.world.updatePlayerMobTypeMap(spawned);
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index d92fbea4c7..f9bc2ab66e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -267,6 +267,7 @@ public class EntityTypes<T extends Entity> {
|
||||
return this.be;
|
||||
}
|
||||
|
||||
+ public EnumCreatureType getEnumCreatureType(){ return this.e(); } // Paper - OBFHELPER
|
||||
public EnumCreatureType e() {
|
||||
return this.ba;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 4c774e31dc..ebf0298631 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -137,6 +137,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
this.setViewDistance(i);
|
||||
}
|
||||
|
||||
+ private static double squareDist(ChunkCoordIntPair chunkcoord, Entity entity) { return a(chunkcoord, entity); } // Paper - OBFHELPER
|
||||
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
||||
double d0 = (double) (chunkcoordintpair.x * 16 + 8);
|
||||
double d1 = (double) (chunkcoordintpair.z * 16 + 8);
|
||||
@@ -1340,8 +1341,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public Stream<EntityPlayer> a(ChunkCoordIntPair chunkcoordintpair, boolean flag) {
|
||||
+ public Stream<EntityPlayer> getPlayersNear(ChunkCoordIntPair coordIntPair) { return a(coordIntPair, false); } // Paper - OBFHELPER
|
||||
+ @Override public Stream<EntityPlayer> a(ChunkCoordIntPair chunkcoordintpair, boolean flag) {
|
||||
return this.playerMap.a(chunkcoordintpair.pair()).filter((entityplayer) -> {
|
||||
int i = b(chunkcoordintpair, entityplayer, true);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 5c0d9c77c4..1418264f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -20,16 +20,15 @@ public final class SpawnerCreature {
|
||||
public static void a(EnumCreatureType enumcreaturetype, World world, Chunk chunk, BlockPosition blockposition) {
|
||||
spawnMobs(enumcreaturetype, world, chunk, blockposition, Integer.MAX_VALUE);
|
||||
}
|
||||
-
|
||||
- public static int spawnMobs(EnumCreatureType enumcreaturetype, World world, Chunk chunk, BlockPosition blockposition, int maxSpawns) {
|
||||
- // Paper end
|
||||
+ public static List<Entity> spawnMobs(EnumCreatureType enumcreaturetype, World world, Chunk chunk, BlockPosition blockposition, int maxSpawns) {
|
||||
+ List<Entity> mobsSpawned = new java.util.ArrayList<>();
|
||||
+ // Paper end
|
||||
ChunkGenerator<?> chunkgenerator = world.getChunkProvider().getChunkGenerator();
|
||||
int i = 0;
|
||||
BlockPosition blockposition1 = getRandomPosition(world, chunk);
|
||||
int j = blockposition1.getX();
|
||||
int k = blockposition1.getY();
|
||||
int l = blockposition1.getZ();
|
||||
- int amountSpawned = 0; // Paper - keep track of mobs spawned
|
||||
|
||||
if (k >= 1) {
|
||||
IBlockData iblockdata = world.getTypeIfLoadedAndInBounds(blockposition1); // Paper - don't load chunks for mob spawn
|
||||
@@ -107,7 +106,7 @@ public final class SpawnerCreature {
|
||||
);
|
||||
if (!event.callEvent()) {
|
||||
if (event.shouldAbortSpawn()) {
|
||||
- return amountSpawned; // Paper
|
||||
+ return mobsSpawned; // Paper
|
||||
}
|
||||
++i2;
|
||||
continue;
|
||||
@@ -126,7 +125,7 @@ public final class SpawnerCreature {
|
||||
} catch (Exception exception) {
|
||||
SpawnerCreature.LOGGER.warn("Failed to create mob", exception);
|
||||
ServerInternalException.reportInternalException(exception); // Paper
|
||||
- return amountSpawned; // Paper
|
||||
+ return mobsSpawned; // Paper
|
||||
}
|
||||
|
||||
entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, world.random.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -137,15 +136,15 @@ public final class SpawnerCreature {
|
||||
++i;
|
||||
++i2;
|
||||
// Paper start - stop when limit is reached
|
||||
- ++amountSpawned;
|
||||
+ mobsSpawned.add(entityinsentient);
|
||||
}
|
||||
- if (amountSpawned >= maxSpawns) {
|
||||
- return amountSpawned;
|
||||
+ if (mobsSpawned.size() >= maxSpawns) {
|
||||
+ return mobsSpawned;
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
if (i >= entityinsentient.dC()) {
|
||||
- return amountSpawned; // Paper
|
||||
+ return mobsSpawned; // Paper
|
||||
}
|
||||
|
||||
if (entityinsentient.c(i2)) {
|
||||
@@ -171,7 +170,7 @@ public final class SpawnerCreature {
|
||||
|
||||
}
|
||||
}
|
||||
- return amountSpawned; // Paper
|
||||
+ return mobsSpawned; // Paper
|
||||
}
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ba4f7999f9..38768a5002 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -70,6 +70,7 @@ public class WorldServer extends World {
|
||||
private boolean ticking;
|
||||
@Nullable
|
||||
private final MobSpawnerTrader mobSpawnerTrader;
|
||||
+ private Map<UUID, Map<EnumCreatureType, Integer>> playerMobTypeMap; // Paper
|
||||
|
||||
// CraftBukkit start
|
||||
private int tickPosition;
|
||||
@@ -966,6 +967,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
public Object2IntMap<EnumCreatureType> l() {
|
||||
+ List<Entity> filteredEntities = new java.util.ArrayList<>(); // Paper
|
||||
Object2IntMap<EnumCreatureType> object2intmap = new Object2IntOpenHashMap();
|
||||
ObjectIterator objectiterator = this.entitiesById.values().iterator();
|
||||
|
||||
@@ -990,14 +992,48 @@ public class WorldServer extends World {
|
||||
entity.spawnReason == CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) {
|
||||
continue;
|
||||
}
|
||||
+ filteredEntities.add(entity); // Paper
|
||||
// Paper end
|
||||
object2intmap.mergeInt(enumcreaturetype, 1, Integer::sum);
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ if(this.paperConfig.perPlayerMobSpawns) {
|
||||
+ this.playerMobTypeMap = new java.util.HashMap<>(this.players.size());
|
||||
+ updatePlayerMobTypeMap(filteredEntities);
|
||||
+ }
|
||||
+ // Paper end
|
||||
return object2intmap;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ public void updatePlayerMobTypeMap(List<Entity> entities) {
|
||||
+ if (this.playerMobTypeMap == null) { return; }
|
||||
+ for (Entity entity : entities) {
|
||||
+ ((ChunkProviderServer) this.chunkProvider).playerChunkMap.getPlayersNear(entity.getChunkAtLocation().getPos()).forEach( (player) -> {
|
||||
+ if (!this.playerMobTypeMap.containsKey(player.uniqueID)) { this.playerMobTypeMap.put(player.uniqueID, new java.util.EnumMap<>(EnumCreatureType.class)); }
|
||||
+ Map<EnumCreatureType, Integer> tmpMap = this.playerMobTypeMap.get(player.uniqueID);
|
||||
+ EnumCreatureType enumType = entity.getEntityType().getEnumCreatureType();
|
||||
+ tmpMap.put(
|
||||
+ enumType,
|
||||
+ tmpMap.getOrDefault(enumType, 0) + 1);
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public int getMobCountNear(EntityPlayer entityPlayer, EnumCreatureType enumCreatureType) {
|
||||
+ int count = 0;
|
||||
+ if (this.playerMobTypeMap != null) {
|
||||
+ Map<EnumCreatureType, Integer> map = this.playerMobTypeMap.get(entityPlayer.uniqueID);
|
||||
+ if (map != null) {
|
||||
+ count = map.getOrDefault(enumCreatureType, 0);
|
||||
+ }
|
||||
+ }
|
||||
+ return count;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public boolean addEntity(Entity entity) {
|
||||
// CraftBukkit start
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From be1741ea568ce4b0ad7c28e96ab5afc191544b32 Mon Sep 17 00:00:00 2001
|
||||
From b0e936f3b1898320af6de97e05c0e7c9eb2c163e Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 22 Jul 2019 17:32:17 -0500
|
||||
Subject: [PATCH] Implement configurable search radius for villagers to spawn
|
||||
@@ -1,16 +1,16 @@
|
||||
From 9f65c68e7f315074b3b16e408c8cc072356d36eb Mon Sep 17 00:00:00 2001
|
||||
From e20a8875da1fd27d1a92a487e81a79efa9392f75 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 10:07:16 -0500
|
||||
Subject: [PATCH] Implement lagging threshold
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/MinecraftServer.java | 2 ++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 2 ++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
src/main/java/org/bukkit/craftbukkit/CraftServer.java | 5 +++++
|
||||
3 files changed, 9 insertions(+)
|
||||
3 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a4bd7348eb..d1e8cb4f4c 100644
|
||||
index f8da3a77da..af37c943e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -175,6 +175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -21,7 +21,7 @@ index a4bd7348eb..d1e8cb4f4c 100644
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
|
||||
@@ -906,6 +907,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -901,6 +902,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
recentTps[0] = tps1.getAverage();
|
||||
recentTps[1] = tps5.getAverage();
|
||||
recentTps[2] = tps15.getAverage();
|
||||
@@ -30,21 +30,21 @@ index a4bd7348eb..d1e8cb4f4c 100644
|
||||
tickSection = curTime;
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index d8321e8ec3..14450651cb 100644
|
||||
index db98610520..6f97d26cb8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -138,9 +138,11 @@ public class PurpurConfig {
|
||||
|
||||
public static boolean enableTickOverload = false;
|
||||
public static boolean enableTPSCatchup = false;
|
||||
+ public static double laggingThreshold = 19.0D;
|
||||
private static void tickLoopSettings() {
|
||||
enableTickOverload = getBoolean("settings.enable-tick-overload", enableTickOverload);
|
||||
enableTPSCatchup = getBoolean("settings.enable-tps-catchup", enableTPSCatchup);
|
||||
+ laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
||||
@@ -136,6 +136,11 @@ public class PurpurConfig {
|
||||
return config.getString(path, config.getString(path));
|
||||
}
|
||||
|
||||
+ public static double laggingThreshold = 19.0D;
|
||||
+ private static void tickLoopSettings() {
|
||||
+ laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
|
||||
+ }
|
||||
+
|
||||
public static boolean disableDropsOnCrammingDeath = true;
|
||||
private static void disableDropsOnCrammingDeath() {
|
||||
disableDropsOnCrammingDeath = getBoolean("settings.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 34a6d26a2a..42b986274f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1,4 +1,4 @@
|
||||
From 4f4f58d77cc1c5db32fce7052ce7e49b2a0aa909 Mon Sep 17 00:00:00 2001
|
||||
From b42e47629d65fc5fef17091dc5f310f5cbeaf1ab Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 08:28:21 -0500
|
||||
Subject: [PATCH] Implement configurable villager brain ticks
|
||||
@@ -40,10 +40,10 @@ index 0800788e5b..2c45661386 100644
|
||||
this.world.getMethodProfiler().exit();
|
||||
if (!this.dY() && this.bE > 0) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 048954c8d4..d964f9025a 100644
|
||||
index 6f97d26cb8..a0bd985833 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -215,6 +215,13 @@ public class PurpurConfig {
|
||||
@@ -211,6 +211,13 @@ public class PurpurConfig {
|
||||
snowmanPumpkinPutBack = getBoolean("settings.mobs.snow_golem.pumpkin-can-be-added-back", snowmanPumpkinPutBack);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 3e7ce447de35ad589437845bdbd9d16f0a41e9f2 Mon Sep 17 00:00:00 2001
|
||||
From 8fe170dadbfa162a96bce3f144e17eaa07c09c2c Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 25 Jul 2019 18:07:37 -0500
|
||||
Subject: [PATCH] Implement elytra settings
|
||||
@@ -123,7 +123,7 @@ index d2eb861af2..b89f9fe7b1 100644
|
||||
return this.x * this.x + this.y * this.y + this.z * this.z;
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 88a7e9ec6e..3b1438dd81 100644
|
||||
index 4dfecc4a1b..6a3df6ed2a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -140,4 +140,17 @@ public class PurpurWorldConfig {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 24153d1feb47ab075ec741ecd5934016c7cd9e9b Mon Sep 17 00:00:00 2001
|
||||
From 84a3bcdb0c169415617c66653dcae9432e40d3d4 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 20 Jul 2019 15:20:04 -0700
|
||||
Subject: [PATCH] Better server sleeping/waiting
|
||||
@@ -67,10 +67,10 @@ index 84024e6ba4..78ea0a251e 100644
|
||||
while (this.executeNext()) {
|
||||
;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a8703a42e5..375bc274a7 100644
|
||||
index af37c943e7..4a26002efa 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1000,9 +1000,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -989,9 +989,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
protected void sleepForTick() {
|
||||
//this.executeAll(); // Paper - move this into the tick method for timings
|
||||
@@ -1,4 +1,4 @@
|
||||
From 16a706182d2cb208e6410a44bc1bdf2fb75aa9b6 Mon Sep 17 00:00:00 2001
|
||||
From 3bb66bffba108f87d54f038adff9f73652ef6425 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Mon, 11 Mar 2019 12:18:29 -0700
|
||||
Subject: [PATCH] Rate limit packets incoming from players
|
||||
@@ -194,7 +194,7 @@ index 96a785af27..ff8b5e76f3 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 3869cdeeb6..226a871aaf 100644
|
||||
index 520490d59c..8aa8a672db 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -140,6 +140,60 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1,4 +1,4 @@
|
||||
From 17854f31076fcfe3b5f2620b3285a38d92f8e741 Mon Sep 17 00:00:00 2001
|
||||
From 98545d3bf632e6a1938fe8833611943f761c46a3 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 27 Jul 2019 17:20:35 -0500
|
||||
Subject: [PATCH] Add option to disable pillager patrols
|
||||
@@ -21,10 +21,10 @@ index bb612b3861..99bb38f033 100644
|
||||
return 0;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 5621edab52..f47756fa66 100644
|
||||
index a0bd985833..bf8a9f30c8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -208,6 +208,11 @@ public class PurpurConfig {
|
||||
@@ -204,6 +204,11 @@ public class PurpurConfig {
|
||||
spawnPhantomsInTheEnd = getBoolean("settings.mobs.phantom.spawn-in-the-end", spawnPhantomsInTheEnd);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 34e3ae250791144fd6ad7e7061564395879cf962 Mon Sep 17 00:00:00 2001
|
||||
From 55b239d2c5ce869c390f2778c8189f9daa03d1f1 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 28 Jul 2019 01:27:37 -0500
|
||||
Subject: [PATCH] Add 5 second tps average in /tps
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH] Add 5 second tps average in /tps
|
||||
3 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 36606e5b3b..62707d8479 100644
|
||||
index 4a26002efa..80c22f3b84 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -174,7 +174,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -30,7 +30,7 @@ index 36606e5b3b..62707d8479 100644
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -900,13 +901,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -895,13 +896,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
{
|
||||
final long diff = curTime - tickSection;
|
||||
java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
Reference in New Issue
Block a user