From c66adfb39d662cbaaf3cce46962efcabd328c17b Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 24 Oct 2021 19:38:23 +0200 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6823) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 58c2d3c7 SPIGOT-6771: Help command tab completion does not respect permissions CraftBukkit Changes: fd50041d SPIGOT-6768: Remove upper bound on setFreezeTicks Spigot Changes: 38929296 SPIGOT-6767: Configurable Thunder Chance --- patches/server/0035-Disable-thunder.patch | 6 +++--- patches/server/0790-Optimise-random-block-ticking.patch | 4 ++-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/server/0035-Disable-thunder.patch b/patches/server/0035-Disable-thunder.patch index 987971dac4..23facf4abd 100644 --- a/patches/server/0035-Disable-thunder.patch +++ b/patches/server/0035-Disable-thunder.patch @@ -19,15 +19,15 @@ index cac8606f65e587d34e2ae12f5962f236c316751e..b18622c199f57e0d7c201582fe83bb75 + } } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 29cff1fba174be7fb6b26958db61bd4ea6c3125d..bf42ee77cb877a83031ce19f1b54f5659cd93ea0 100644 +index 55dda62e7ec3b92a406ce85d345dd7af422e2783..2649c180cbfcc210458ca795d3f14fa0b6017546 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -644,7 +644,7 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.push("thunder"); BlockPos blockposition; -- if (flag && this.isThundering() && this.random.nextInt(100000) == 0) { -+ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder +- if (flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot ++ if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); diff --git a/patches/server/0790-Optimise-random-block-ticking.patch b/patches/server/0790-Optimise-random-block-ticking.patch index c7bdbe0f8e..509c8d3a7d 100644 --- a/patches/server/0790-Optimise-random-block-ticking.patch +++ b/patches/server/0790-Optimise-random-block-ticking.patch @@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..e8b4053babe46999980b926431254050 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a999fece43b1b3f687061b541a975d889886db60..f512d68cbeb243fbef8fad73472ea6587112f889 100644 +index deda6741a81151fe4acb87925edad2201a92b79e..1141e264862fb36c1a085c236f14f7fe1cf49c85 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -743,6 +743,10 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -92,7 +92,7 @@ index a999fece43b1b3f687061b541a975d889886db60..f512d68cbeb243fbef8fad73472ea658 - BlockPos blockposition; + final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change - if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.random.nextInt(100000) == 0) { // Paper - Disable thunder + if (!this.paperConfig.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder - blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15)); + blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper if (this.isRainingAt(blockposition)) { diff --git a/work/Bukkit b/work/Bukkit index e337669a52..58c2d3c7b8 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit e337669a5233c785af433eac628e25b117dde034 +Subproject commit 58c2d3c7b845e2db9476e5e76e4b7f7d376f05e8 diff --git a/work/CraftBukkit b/work/CraftBukkit index f0f801e58e..fd50041d32 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit f0f801e58e1cef125052b1e8a4bc420ca7acff83 +Subproject commit fd50041d32495444c229c63a6adf691c93b135e1 diff --git a/work/Spigot b/work/Spigot index dc75aca853..38929296b0 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit dc75aca85361e65679880f2abd5c92f6db448ae2 +Subproject commit 38929296b008a62a7a8532c46550aa493e2246a8