Port requested patches from Purpur

Ported: TPSBar, custom growth rates and configurable lava speed
This commit is contained in:
Ivan Pekov 2020-12-23 09:46:56 +02:00
parent 89229b4966
commit 5c8274bd2f
No known key found for this signature in database
GPG Key ID: BC975C392D9CA3A3
12 changed files with 73 additions and 20 deletions

View File

@ -28,6 +28,7 @@ # Patches
| server | Add permission for F3+N debug | William Blake Galbreath | |
| server | Add timings for Behavior | Phoenix616 | |
| server | Add timings for Pathfinder | MrIvanPlays | |
| server | Add twisting and weeping vines growth rates | BillyGalbreath | |
| server | AirplaneLite Data Structs | Paul Sauve | |
| server | AirplaneLite MC Dev Fixes | Paul Sauve | |
| server | Allow anvil colors | William Blake Galbreath | |
@ -68,11 +69,14 @@ # Patches
| server | Fix exp drop of zombie pigmen (MC-56653) | Phoenix616 | |
| server | Fix lead fall dmg config | tr7zw | |
| server | Fix the dead lagging the server | William Blake Galbreath | |
| server | Fix vanilla command permission handler | William Blake Galbreath | |
| server | Global Eula file | tr7zw | |
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn |
| server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov |
| server | Highly optimize VillagePlace filtering | Ivan Pekov | |
| server | Hopper Optimizations | Phoenix616 | |
| server | Implement TPSBar | BillyGalbreath | |
| server | Implement bamboo growth settings | William Blake Galbreath | |
| server | Improve task performance | ishland | Mykyta Komarn |
| server | Infinity No Arrows | Bud Gidiere | |
| server | Infinity bow settings | William Blake Galbreath | |
@ -81,6 +85,7 @@ # Patches
| server | Lagging threshold | William Blake Galbreath | |
| server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | |
| server | MC-168772 Fix - Add turtle egg block options | William Blake Galbreath | |
| server | Make lava flow speed configurable | William Blake Galbreath | |
| api | Modify POM | YatopiaMC | |
| server | Modify POM | YatopiaMC | |
| server | Modify default configs | tr7zw | |

View File

@ -1 +1 @@
Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&PaperPR-Projectile-load-save-limit-per-chunk&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks
Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-vanilla-command-permission-handler&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&Make-lava-flow-speed-configurable&PaperPR-Projectile-load-save-limit-per-chunk&Implement-bamboo-growth-settings&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Add-twisting-and-weeping-vines-growth-rates&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks&Implement-TPSBar

View File

@ -141,6 +141,30 @@ index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a
public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper
public static long a(long i, EnumDirection enumdirection) {
return a(i, enumdirection.getAdjacentX(), enumdirection.getAdjacentY(), enumdirection.getAdjacentZ());
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
index cabce1a8ba5db56495628edd9bc796aee7a53356..6cf74a3a036e6551cb1400fa68592a19cd0f5a71 100644
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
@@ -337,6 +337,7 @@ public class CommandDispatcher {
}
+ public static LiteralArgumentBuilder<CommandListenerWrapper> literal(String s) { return a(s); } // Purpur - OBFHELPER
public static LiteralArgumentBuilder<CommandListenerWrapper> a(String s) {
return LiteralArgumentBuilder.literal(s);
}
diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
index 86f1cfe454ea0a989775b49a6b88375c766ef647..da53af61d1171db3c167c6e007adf95355771653 100644
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
@@ -189,6 +189,7 @@ public class CommandListenerWrapper implements ICompletionProvider, com.destroys
}
}
+ public EntityPlayer getPlayerOrException() throws CommandSyntaxException { return h(); } // Purpur - OBFHELPER
public EntityPlayer h() throws CommandSyntaxException {
if (!(this.k instanceof EntityPlayer)) {
throw CommandListenerWrapper.a.create();
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index c8bbcf43d3352b3d42e15a2e2d1673b08bc16402..119abc84fadb6b011813ae8667a48c87feffcdc4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
@ -503,7 +527,7 @@ index ccee2c7ae135a3a532f76b44d7d3ad6db7e8c387..00000000000000000000000000000000
- public static String afkBroadcastBack = "§e§o%s is no longer AFK";
- public static String afkTabListPrefix = "[AFK] ";
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb487cab5f3 100644
index 361f7857e461578e90cb71e15027dadaf794cb69..512f42b6fcbf7c09c1473c5ae529d5d1a48a6cf5 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1,7 +1,15 @@
@ -522,7 +546,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4
import static net.pl3x.purpur.PurpurConfig.log;
public class PurpurWorldConfig {
@@ -56,4 +64,139 @@ public class PurpurWorldConfig {
@@ -56,4 +64,163 @@ public class PurpurWorldConfig {
PurpurConfig.config.addDefault("world-settings.default." + path, def);
return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path));
}
@ -660,6 +684,30 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4
+ PaperConfig.saveConfig();
+ }
+ }
+ }
+
+ public int bambooMaxHeight = 16;
+ public int bambooSmallHeight = 10;
+ private void bambooSettings() {
+ bambooMaxHeight = getInt("blocks.bamboo.max-height", bambooMaxHeight);
+ bambooSmallHeight = getInt("blocks.bamboo.small-height", bambooSmallHeight);
+ }
+
+ public double twistingVinesGrowthModifier = 0.10D;
+ private void twistingVinesSettings() {
+ twistingVinesGrowthModifier = getDouble("blocks.twisting_vines.growth-modifier", twistingVinesGrowthModifier);
+ }
+
+ public double weepingVinesGrowthModifier = 0.10D;
+ private void weepingVinesSettings() {
+ weepingVinesGrowthModifier = getDouble("blocks.weeping_vines.growth-modifier", weepingVinesGrowthModifier);
+ }
+
+ public int lavaSpeedNether = 10;
+ public int lavaSpeedNotNether = 30;
+ private void lavaSettings() {
+ lavaSpeedNether = getInt("blocks.lava.speed.nether", lavaSpeedNether);
+ lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
+ }
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej

View File

@ -39,10 +39,10 @@ index 74ed02fa9296583977bb721014b10ff8b708b43c..a13c7b2b5bc79ecaea404779149ed02c
.completer(new ConsoleCommandCompleter(this.server))
);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7510d4b98804f79276b02b40de5fa8e8bc2cde7a..8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0 100644
index a91869dde9f47e00b6c6e380e7d3b92282d9b235..fc3abab760aa90e2afa5b4bf6abd3a0aff897f25 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1522,7 +1522,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1524,7 +1524,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -7,10 +7,10 @@ Original patch by:
Co-authored-by: tr7zw <tr7zw@live.de>
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348b7e31fac 100644
index fc3abab760aa90e2afa5b4bf6abd3a0aff897f25..e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -934,6 +934,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -936,6 +936,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper End
// Spigot End
@ -19,7 +19,7 @@ index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348
protected void w() {
try {
long serverStartTime = SystemUtils.getMonotonicNanos(); // Paper
@@ -1005,7 +1007,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1007,7 +1009,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(gameprofilertick);
this.methodProfiler.a();
this.methodProfiler.enter("tick");

View File

@ -67,7 +67,7 @@ index 1b646a7bb1588ebff5b4fdb12bd3016084041e77..d37143396cac0bc8980b03fe0e5e31cc
if (this.isFireProof() || this.world.isClientSide) {
this.extinguish();
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d0fc49cb95bbebd5de9cec41dfb5b359c1724360..ce7724a1797a992561d074f85c7bdef71b4dbe78 100644
index 528072b27060becb37f73fa9b50bac6e3d2b2232..d56ca11a30faeb4f1346b853f50c25f46e3bd49e 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -188,7 +188,7 @@ public abstract class PlayerList {

View File

@ -55,10 +55,10 @@ index 4094ef76b7b05de1bfcc28aa0ef13033abadeb7e..0224a6d0e47e836fa485b39e7b4ce5b8
Throwable throwable = null;
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef81b1a9409 100644
index d56ca11a30faeb4f1346b853f50c25f46e3bd49e..d52985bc8236ba78b9530b4465e1f6de895f3b72 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -636,6 +636,7 @@ public abstract class PlayerList {
@@ -638,6 +638,7 @@ public abstract class PlayerList {
GameProfileBanEntry gameprofilebanentry;
if (getProfileBans().isBanned(gameprofile) && (gameprofilebanentry = getProfileBans().get(gameprofile)) != null) {
// Paper end
@ -66,7 +66,7 @@ index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef8
chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()});
if (gameprofilebanentry.getExpires() != null) {
@@ -643,7 +644,11 @@ public abstract class PlayerList {
@@ -645,7 +646,11 @@ public abstract class PlayerList {
}
// return chatmessage;

View File

@ -39,7 +39,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969
this.minecraftServer.getPlayerList().sendMessage(CraftChatMessage.fromString(quitMessage));
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b463664860f95 100644
index d52985bc8236ba78b9530b4465e1f6de895f3b72..6b7209a4a5128a2fa64442365a4e53c7cf866621 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -499,6 +499,11 @@ public abstract class PlayerList {
@ -54,7 +54,7 @@ index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b4636
WorldServer worldserver = entityplayer.getWorldServer();
entityplayer.a(StatisticList.LEAVE_GAME);
@@ -587,7 +592,7 @@ public abstract class PlayerList {
@@ -589,7 +594,7 @@ public abstract class PlayerList {
cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end

View File

@ -185,10 +185,10 @@ index 0224a6d0e47e836fa485b39e7b4ce5b83ea554bf..fe578d306575bbdc8ca4a993a648e889
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index eb9d61b5e76c7b40faebfa8308cd3348b7e31fac..ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e 100644
index e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b..c7031706ea51dd6d8c22c10fab2ce3154daac361 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1967,6 +1967,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1969,6 +1969,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return new DataPackConfiguration(list, list1);
}

View File

@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu
This patch implements a hard toggle for the event.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e..571483166c69079961c3297e1b40265b62f34217 100644
index c7031706ea51dd6d8c22c10fab2ce3154daac361..f4ca05cc77ae5ea47db51770f316413fdf8a728b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1410,7 +1410,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1412,7 +1412,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();

View File

@ -18,7 +18,7 @@ index 0046dedd5e5f503ee680b89ec7e3dca681c26686..4412d465afcab66a1922217c931e73dc
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 117e32be8c34f264cfeae78081abefb487cab5f3..03b642a40b0082d5c1b852ac34b691f0cace27ba 100644
index 512f42b6fcbf7c09c1473c5ae529d5d1a48a6cf5..7d0e889d2533e056e46d6842e427b077c3a74534 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -176,10 +176,12 @@ public class PurpurWorldConfig {

View File

@ -145,7 +145,7 @@ index 9190caed195b9987e3af545f4de63b8d956788a6..178386cfb44152b50757234a624afef0
private final MinecraftServer server;
public final NetworkManager networkManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 571483166c69079961c3297e1b40265b62f34217..55d22bfa2f30e2eaaf11836c29c90c86e764a41a 100644
index f4ca05cc77ae5ea47db51770f316413fdf8a728b..b9b9caa0463580b744225beb7133d9282c5899f3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -197,7 +197,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas