aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-06-13 10:12:48 -0700
committerJake Potrebic <[email protected]>2024-06-13 10:12:48 -0700
commit79da0788dd4818e1c401ead8bb1a44cecbb92928 (patch)
tree6337d12ba0eef2c588f46f1b5cc3842713643203
parent0ef31547a184a0710d3cd62e191fe2bc70d22bc6 (diff)
downloadPaper-79da0788dd4818e1c401ead8bb1a44cecbb92928.tar.gz
Paper-79da0788dd4818e1c401ead8bb1a44cecbb92928.zip
62
-rw-r--r--build.gradle.kts2
-rw-r--r--patches/server/Add-BeaconEffectEvent.patch (renamed from patches/unapplied/server/Add-BeaconEffectEvent.patch)2
-rw-r--r--patches/server/Add-PlayerInitialSpawnEvent.patch (renamed from patches/unapplied/server/Add-PlayerInitialSpawnEvent.patch)0
-rw-r--r--patches/server/Add-TickThread.patch (renamed from patches/unapplied/server/Add-TickThread.patch)0
-rw-r--r--patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch (renamed from patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch)0
-rw-r--r--patches/server/Add-configurable-entity-despawn-distances.patch (renamed from patches/unapplied/server/Add-configurable-entity-despawn-distances.patch)2
-rw-r--r--patches/server/Add-configurable-portal-search-radius.patch38
-rw-r--r--patches/server/Add-more-entities-to-activation-range-ignore-list.patch (renamed from patches/unapplied/server/Add-more-entities-to-activation-range-ignore-list.patch)0
-rw-r--r--patches/server/Add-velocity-warnings.patch (renamed from patches/unapplied/server/Add-velocity-warnings.patch)0
-rw-r--r--patches/server/Adventure.patch (renamed from patches/unapplied/server/Adventure.patch)80
-rw-r--r--patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch (renamed from patches/unapplied/server/All-chunks-are-slime-spawn-chunks-toggle.patch)0
-rw-r--r--patches/server/Allow-nerfed-mobs-to-jump.patch (renamed from patches/unapplied/server/Allow-nerfed-mobs-to-jump.patch)4
-rw-r--r--patches/server/Be-a-bit-more-informative-in-maxHealth-exception.patch (renamed from patches/unapplied/server/Be-a-bit-more-informative-in-maxHealth-exception.patch)0
-rw-r--r--patches/server/Build-system-changes.patch (renamed from patches/unapplied/server/Build-system-changes.patch)6
-rw-r--r--patches/server/CB-fixes.patch (renamed from patches/unapplied/server/CB-fixes.patch)0
-rw-r--r--patches/server/Check-online-mode-before-converting-and-renaming-pla.patch (renamed from patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch)0
-rw-r--r--patches/server/ConcurrentUtil.patch (renamed from patches/unapplied/server/ConcurrentUtil.patch)0
-rw-r--r--patches/server/Configurable-Disabling-Cat-Chest-Detection.patch (renamed from patches/unapplied/server/Configurable-Disabling-Cat-Chest-Detection.patch)0
-rw-r--r--patches/server/Configurable-baby-zombie-movement-speed.patch (renamed from patches/unapplied/server/Configurable-baby-zombie-movement-speed.patch)17
-rw-r--r--patches/server/Configurable-cactus-bamboo-and-reed-growth-height.patch (renamed from patches/unapplied/server/Configurable-cactus-bamboo-and-reed-growth-height.patch)0
-rw-r--r--patches/server/Configurable-container-update-tick-rate.patch (renamed from patches/unapplied/server/Configurable-container-update-tick-rate.patch)4
-rw-r--r--patches/server/Configurable-end-credits.patch18
-rw-r--r--patches/server/Configurable-fishing-time-ranges.patch (renamed from patches/unapplied/server/Configurable-fishing-time-ranges.patch)8
-rw-r--r--patches/server/Configurable-mob-spawner-tick-rate.patch (renamed from patches/unapplied/server/Configurable-mob-spawner-tick-rate.patch)0
-rw-r--r--patches/server/Configurable-top-of-nether-void-damage.patch (renamed from patches/unapplied/server/Configurable-top-of-nether-void-damage.patch)18
-rw-r--r--patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch (renamed from patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch)0
-rw-r--r--patches/server/Disable-explosion-knockback.patch (renamed from patches/unapplied/server/Disable-explosion-knockback.patch)4
-rw-r--r--patches/server/Disable-ice-and-snow.patch (renamed from patches/unapplied/server/Disable-ice-and-snow.patch)0
-rw-r--r--patches/server/Disable-spigot-tick-limiters.patch (renamed from patches/unapplied/server/Disable-spigot-tick-limiters.patch)0
-rw-r--r--patches/server/Disable-thunder.patch (renamed from patches/unapplied/server/Disable-thunder.patch)0
-rw-r--r--patches/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch (renamed from patches/unapplied/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch)6
-rw-r--r--patches/server/Entity-Origin-API.patch (renamed from patches/unapplied/server/Entity-Origin-API.patch)0
-rw-r--r--patches/server/Expose-server-CommandMap.patch (renamed from patches/unapplied/server/Expose-server-CommandMap.patch)0
-rw-r--r--patches/server/Expose-server-build-information.patch (renamed from patches/unapplied/server/Expose-server-build-information.patch)2
-rw-r--r--patches/server/Fix-lag-from-explosions-processing-dead-entities.patch (renamed from patches/unapplied/server/Fix-lag-from-explosions-processing-dead-entities.patch)0
-rw-r--r--patches/server/Further-improve-server-tick-loop.patch (renamed from patches/unapplied/server/Further-improve-server-tick-loop.patch)0
-rw-r--r--patches/server/Handle-plugin-prefixes-using-Log4J-configuration.patch (renamed from patches/unapplied/server/Handle-plugin-prefixes-using-Log4J-configuration.patch)0
-rw-r--r--patches/server/Hook-into-CB-plugin-rewrites.patch (renamed from patches/unapplied/server/Hook-into-CB-plugin-rewrites.patch)2
-rw-r--r--patches/server/Implement-PlayerLocaleChangeEvent.patch (renamed from patches/unapplied/server/Implement-PlayerLocaleChangeEvent.patch)6
-rw-r--r--patches/server/Improve-Log4J-Configuration-Plugin-Loggers.patch (renamed from patches/unapplied/server/Improve-Log4J-Configuration-Plugin-Loggers.patch)0
-rw-r--r--patches/server/Improve-Player-chat-API-handling.patch (renamed from patches/unapplied/server/Improve-Player-chat-API-handling.patch)0
-rw-r--r--patches/server/MC-Dev-fixes.patch (renamed from patches/unapplied/server/MC-Dev-fixes.patch)0
-rw-r--r--patches/server/MC-Utils.patch (renamed from patches/unapplied/server/MC-Utils.patch)143
-rw-r--r--patches/server/Only-refresh-abilities-if-needed.patch (renamed from patches/unapplied/server/Only-refresh-abilities-if-needed.patch)0
-rw-r--r--patches/server/Optimize-explosions.patch (renamed from patches/unapplied/server/Optimize-explosions.patch)0
-rw-r--r--patches/server/Paper-Metrics.patch (renamed from patches/unapplied/server/Paper-Metrics.patch)0
-rw-r--r--patches/server/Paper-Plugins.patch (renamed from patches/unapplied/server/Paper-Plugins.patch)0
-rw-r--r--patches/server/Paper-command.patch (renamed from patches/unapplied/server/Paper-command.patch)0
-rw-r--r--patches/server/Paper-config-files.patch (renamed from patches/unapplied/server/Paper-config-files.patch)4
-rw-r--r--patches/server/Player-Tab-List-and-Title-APIs.patch (renamed from patches/unapplied/server/Player-Tab-List-and-Title-APIs.patch)0
-rw-r--r--patches/server/Player-affects-spawning-API.patch (renamed from patches/unapplied/server/Player-affects-spawning-API.patch)6
-rw-r--r--patches/server/Plugin-remapping.patch (renamed from patches/unapplied/server/Plugin-remapping.patch)0
-rw-r--r--patches/server/Prevent-block-entity-and-entity-crashes.patch (renamed from patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch)0
-rw-r--r--patches/server/Remap-fixes.patch (renamed from patches/unapplied/server/Remap-fixes.patch)6
-rw-r--r--patches/server/Remap-reflection-calls-in-plugins-using-internals.patch (renamed from patches/unapplied/server/Remap-reflection-calls-in-plugins-using-internals.patch)2
-rw-r--r--patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch (renamed from patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch)0
-rw-r--r--patches/server/Setup-Gradle-project.patch (renamed from patches/unapplied/server/Setup-Gradle-project.patch)16
-rw-r--r--patches/server/Support-components-in-ItemMeta.patch (renamed from patches/unapplied/server/Support-components-in-ItemMeta.patch)0
-rw-r--r--patches/server/Test-changes.patch (renamed from patches/unapplied/server/Test-changes.patch)0
-rw-r--r--patches/server/Timings-v2.patch (renamed from patches/unapplied/server/Timings-v2.patch)6
-rw-r--r--patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch (renamed from patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch)4
-rw-r--r--patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch (renamed from patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch)4
-rw-r--r--patches/server/Use-UserCache-for-player-heads.patch (renamed from patches/unapplied/server/Use-UserCache-for-player-heads.patch)0
-rw-r--r--patches/unapplied/server/Add-configurable-portal-search-radius.patch38
-rw-r--r--patches/unapplied/server/Configurable-end-credits.patch18
-rw-r--r--patches/unapplied/server/Configurable-inter-world-teleportation-safety.patch30
66 files changed, 213 insertions, 283 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index d57853bb3c..e9fb8e46e3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -67,7 +67,7 @@ repositories {
}
dependencies {
- paramMappings("net.fabricmc:yarn:1.20.6+build.1:mergedv2")
+ paramMappings("net.fabricmc:yarn:1.21+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.10.2:fat")
decompiler("org.vineflower:vineflower:1.10.1")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
diff --git a/patches/unapplied/server/Add-BeaconEffectEvent.patch b/patches/server/Add-BeaconEffectEvent.patch
index 822ec5d128..a53a42ece8 100644
--- a/patches/unapplied/server/Add-BeaconEffectEvent.patch
+++ b/patches/server/Add-BeaconEffectEvent.patch
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import com.destroystokyo.paper.event.block.BeaconEffectEvent;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
- import java.util.Arrays;
+ import java.util.Collection;
@@ -0,0 +0,0 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.phys.AABB;
diff --git a/patches/unapplied/server/Add-PlayerInitialSpawnEvent.patch b/patches/server/Add-PlayerInitialSpawnEvent.patch
index 0075528ea2..0075528ea2 100644
--- a/patches/unapplied/server/Add-PlayerInitialSpawnEvent.patch
+++ b/patches/server/Add-PlayerInitialSpawnEvent.patch
diff --git a/patches/unapplied/server/Add-TickThread.patch b/patches/server/Add-TickThread.patch
index 40e3068554..40e3068554 100644
--- a/patches/unapplied/server/Add-TickThread.patch
+++ b/patches/server/Add-TickThread.patch
diff --git a/patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch
index 2e46a0ce6f..2e46a0ce6f 100644
--- a/patches/unapplied/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch
+++ b/patches/server/Add-command-line-option-to-load-extra-plugin-jars-no.patch
diff --git a/patches/unapplied/server/Add-configurable-entity-despawn-distances.patch b/patches/server/Add-configurable-entity-despawn-distances.patch
index 3fee0c272b..15311ad1e8 100644
--- a/patches/unapplied/server/Add-configurable-entity-despawn-distances.patch
+++ b/patches/server/Add-configurable-entity-despawn-distances.patch
@@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);
diff --git a/patches/server/Add-configurable-portal-search-radius.patch b/patches/server/Add-configurable-portal-search-radius.patch
new file mode 100644
index 0000000000..92b684ca88
--- /dev/null
+++ b/patches/server/Add-configurable-portal-search-radius.patch
@@ -0,0 +1,38 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Joseph Hirschfeld <[email protected]>
+Date: Thu, 3 Mar 2016 02:46:17 -0600
+Subject: [PATCH] Add configurable portal search radius
+
+
+diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
+--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+@@ -0,0 +0,0 @@ public class NetherPortalBlock extends Block implements Portal {
+ WorldBorder worldborder = worldserver1.getWorldBorder();
+ double d0 = DimensionType.getTeleportationScale(world.dimensionType(), worldserver1.dimensionType());
+ BlockPos blockposition1 = worldborder.clampToBounds(entity.getX() * d0, entity.getY(), entity.getZ() * d0);
++ // Paper start - Configurable portal search radius
++ int portalSearchRadius = worldserver1.paperConfig().environment.portalSearchRadius;
++ if (entity.level().paperConfig().environment.portalSearchVanillaDimensionScaling && flag) { // flag = is going to nether
++ portalSearchRadius = (int) (portalSearchRadius / worldserver1.dimensionType().coordinateScale());
++ }
++ // Paper end - Configurable portal search radius
+ // CraftBukkit start
+- CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag ? 16 : 128, 16);
++ CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, 16); // Paper - use custom portal search radius
+ if (event == null) {
+ return null;
+ }
+diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
+--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
++++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+@@ -0,0 +0,0 @@ public class PortalForcer {
+ this.level = world;
+ }
+
++ @io.papermc.paper.annotation.DoNotUse // Paper
+ public Optional<BlockPos> findClosestPortalPosition(BlockPos pos, boolean destIsNether, WorldBorder worldBorder) {
+ // CraftBukkit start
+ return this.findClosestPortalPosition(pos, worldBorder, destIsNether ? 16 : 128); // Search Radius
diff --git a/patches/unapplied/server/Add-more-entities-to-activation-range-ignore-list.patch b/patches/server/Add-more-entities-to-activation-range-ignore-list.patch
index 24fde5f623..24fde5f623 100644
--- a/patches/unapplied/server/Add-more-entities-to-activation-range-ignore-list.patch
+++ b/patches/server/Add-more-entities-to-activation-range-ignore-list.patch
diff --git a/patches/unapplied/server/Add-velocity-warnings.patch b/patches/server/Add-velocity-warnings.patch
index 989bf40426..989bf40426 100644
--- a/patches/unapplied/server/Add-velocity-warnings.patch
+++ b/patches/server/Add-velocity-warnings.patch
diff --git a/patches/unapplied/server/Adventure.patch b/patches/server/Adventure.patch
index d0ee9f098d..802b12a6c1 100644
--- a/patches/unapplied/server/Adventure.patch
+++ b/patches/server/Adventure.patch
@@ -2600,7 +2600,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
- public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
+ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable {
public static final Logger LOGGER = LogUtils.getLogger();
+ public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
@@ -2692,7 +2692,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -0,0 +0,0 @@ import net.minecraft.world.damagesource.CombatTracker;
+@@ -0,0 +0,0 @@ import net.minecraft.world.item.trading.MerchantOffers;
import net.minecraft.world.scores.Scoreboard;
import net.minecraft.world.scores.Team;
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
@@ -2700,7 +2700,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.WeatherType;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
private boolean disconnected;
private int requestedViewDistance;
public String language = "en_us"; // CraftBukkit - default
@@ -2708,7 +2708,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
private Vec3 startingToFallPosition;
@Nullable
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
public String displayName;
@@ -2716,7 +2716,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public Component listName;
public org.bukkit.Location compassTarget;
public int newExp = 0;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
// CraftBukkit start
this.displayName = this.getScoreboardName();
@@ -2724,7 +2724,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.bukkitPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth();
}
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
String deathmessage = defaultMessage.getString();
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
@@ -2751,7 +2751,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
boolean flag1 = true;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
@@ -2766,7 +2766,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
}
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
// CraftBukkit end
this.language = clientOptions.language();
@@ -2797,7 +2797,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.server = minecraftserver;
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
- this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
+ this.disconnect((Component) Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
+ // Paper start - adventure pack callbacks
+ // call the callbacks before the previously-existing event so the event has final say
@@ -2815,36 +2815,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
-
- // CraftBukkit start
- @Deprecated
-- public void disconnect(Component reason) {
-- this.disconnect(CraftChatMessage.fromComponent(reason));
-+ public void disconnect(String s) { // Paper
-+ this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s)); // Paper
+ }
}
- // CraftBukkit end
-- public void disconnect(String s) {
-+ // Paper start
-+ public void disconnect(final Component reason) {
-+ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asAdventure(reason));
++ // Paper start - adventure
++ public void disconnect(@Nullable final net.kyori.adventure.text.Component reason) {
++ this.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(reason));
+ }
++ // Paper end - adventure
+
-+ public void disconnect(net.kyori.adventure.text.Component reason) {
-+ // Paper end
- // CraftBukkit start - fire PlayerKickEvent
- if (this.processedDisconnect) {
- return;
-@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
- Waitable waitable = new Waitable() {
- @Override
- protected Object evaluate() {
-- ServerCommonPacketListenerImpl.this.disconnect(s);
-+ ServerCommonPacketListenerImpl.this.disconnect(reason); // Paper - adventure
- return null;
- }
- };
+ public void disconnect(Component reason) {
+ this.disconnect(new DisconnectionDetails(reason));
+ }
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
return;
}
@@ -2852,8 +2834,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- String leaveMessage = ChatFormatting.YELLOW + this.player.getScoreboardName() + " left the game.";
+ net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure
-- PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), s, leaveMessage);
-+ PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), reason, leaveMessage); // Paper - adventure
+- PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), CraftChatMessage.fromComponent(disconnectionInfo.reason()), leaveMessage);
++ PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(disconnectionInfo.reason()), leaveMessage); // Paper - adventure
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
@@ -2861,11 +2843,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
// Send the possibly modified leave message
-- final Component ichatbasecomponent = CraftChatMessage.fromString(event.getReason(), true)[0];
-+ final Component ichatbasecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
- // CraftBukkit end
+- this.disconnect0(new DisconnectionDetails(CraftChatMessage.fromString(event.getReason(), true)[0], disconnectionInfo.report(), disconnectionInfo.bugReportLink()));
++ this.disconnect0(new DisconnectionDetails(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.reason()), disconnectionInfo.report(), disconnectionInfo.bugReportLink())); // Paper - Adventure
+ }
- this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
+ private void disconnect0(DisconnectionDetails disconnectiondetails) {
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
@@ -2882,9 +2864,9 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -0,0 +0,0 @@ import net.minecraft.core.registries.Registries;
- import net.minecraft.nbt.CompoundTag;
+@@ -0,0 +0,0 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.Connection;
+ import net.minecraft.network.DisconnectionDetails;
import net.minecraft.network.TickablePacketListener;
+import net.minecraft.network.chat.ChatDecorator;
import net.minecraft.network.chat.ChatType;
@@ -3099,7 +3081,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void removeAll() {
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
-- player.connection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
+- player.connection.disconnect(CraftChatMessage.fromStringOrEmpty(this.server.server.getShutdownMessage())); // CraftBukkit - add custom shutdown message
+ player.connection.disconnect(this.server.server.shutdownMessage()); // CraftBukkit - add custom shutdown message // Paper - Adventure
}
// CraftBukkit end
@@ -3978,7 +3960,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
@@ -0,0 +0,0 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
CraftEnchantment ench = (CraftEnchantment) other;
- return !this.handle.isCompatibleWith(ench.getHandle());
+ return !net.minecraft.world.item.enchantment.Enchantment.areCompatible(this.handle, ench.handle);
}
+ // Paper start
+ @Override
@@ -4210,7 +4192,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
- this.getHandle().connection.disconnect(message == null ? "" : message);
+ this.getHandle().connection.disconnect(CraftChatMessage.fromStringOrEmpty(message));
}
+ // Paper start
@@ -4645,7 +4627,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure
CraftPlayer entity = victim.getBukkitEntity();
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
- PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(), 0, deathMessage);
+ PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
@@ -0,0 +0,0 @@ public class CraftEventFactory {
* Server methods
*/
@@ -4782,8 +4764,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -0,0 +0,0 @@ public final class CraftItemFactory implements ItemFactory {
- CraftItemStack craft = (CraftItemStack) itemStack;
- return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(MinecraftServer.getServer().getWorldData().enabledFeatures(), source, craft.handle, level, allowTreasures));
+ Optional<HolderSet.Named<Enchantment>> optional = (allowTreasures) ? Optional.empty() : registry.registryOrThrow(Registries.ENCHANTMENT).getTag(EnchantmentTags.IN_ENCHANTING_TABLE);
+ return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, registry, optional));
}
+
+ // Paper start - Adventure
diff --git a/patches/unapplied/server/All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch
index 3f00aba727..3f00aba727 100644
--- a/patches/unapplied/server/All-chunks-are-slime-spawn-chunks-toggle.patch
+++ b/patches/server/All-chunks-are-slime-spawn-chunks-toggle.patch
diff --git a/patches/unapplied/server/Allow-nerfed-mobs-to-jump.patch b/patches/server/Allow-nerfed-mobs-to-jump.patch
index 15222c8905..53a79a2043 100644
--- a/patches/unapplied/server/Allow-nerfed-mobs-to-jump.patch
+++ b/patches/server/Allow-nerfed-mobs-to-jump.patch
@@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
private final BodyRotationControl bodyRotationControl;
protected PathNavigation navigation;
public GoalSelector goalSelector;
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public GoalSelector targetSelector;
@Nullable
private LivingEntity target;
-@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
protected final void serverAiStep() {
++this.noActionTime;
diff --git a/patches/unapplied/server/Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/Be-a-bit-more-informative-in-maxHealth-exception.patch
index a1cd38131d..a1cd38131d 100644
--- a/patches/unapplied/server/Be-a-bit-more-informative-in-maxHealth-exception.patch
+++ b/patches/server/Be-a-bit-more-informative-in-maxHealth-exception.patch
diff --git a/patches/unapplied/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch
index 6cb114801c..6c4e97188a 100644
--- a/patches/unapplied/server/Build-system-changes.patch
+++ b/patches/server/Build-system-changes.patch
@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
implementation("org.ow2.asm:asm-commons:9.7")
implementation("commons-lang:commons-lang:2.6")
- runtimeOnly("org.xerial:sqlite-jdbc:3.45.3.0")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
@@ -0,0 +0,0 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
@@ -69,7 +69,7 @@ diff --git a/src/main/java/net/minecraft/resources/ResourceLocation.java b/src/m
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/resources/ResourceLocation.java
+++ b/src/main/java/net/minecraft/resources/ResourceLocation.java
-@@ -0,0 +0,0 @@ public class ResourceLocation implements Comparable<ResourceLocation> {
+@@ -0,0 +0,0 @@ public final class ResourceLocation implements Comparable<ResourceLocation> {
public static final char NAMESPACE_SEPARATOR = ':';
public static final String DEFAULT_NAMESPACE = "minecraft";
public static final String REALMS_NAMESPACE = "realms";
@@ -142,7 +142,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -21);
+ deadline.add(Calendar.DAY_OF_YEAR, -3);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
diff --git a/patches/unapplied/server/CB-fixes.patch b/patches/server/CB-fixes.patch
index 4e845afd2d..4e845afd2d 100644
--- a/patches/unapplied/server/CB-fixes.patch
+++ b/patches/server/CB-fixes.patch
diff --git a/patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch
index 6c4dc7fdb5..6c4dc7fdb5 100644
--- a/patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch
+++ b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch
diff --git a/patches/unapplied/server/ConcurrentUtil.patch b/patches/server/ConcurrentUtil.patch
index 0ee59124d6..0ee59124d6 100644
--- a/patches/unapplied/server/ConcurrentUtil.patch
+++ b/patches/server/ConcurrentUtil.patch
diff --git a/patches/unapplied/server/Configurable-Disabling-Cat-Chest-Detection.patch b/patches/server/Configurable-Disabling-Cat-Chest-Detection.patch
index 8b82916913..8b82916913 100644
--- a/patches/unapplied/server/Configurable-Disabling-Cat-Chest-Detection.patch
+++ b/patches/server/Configurable-Disabling-Cat-Chest-Detection.patch
diff --git a/patches/unapplied/server/Configurable-baby-zombie-movement-speed.patch b/patches/server/Configurable-baby-zombie-movement-speed.patch
index 38aaf6f951..7e9197f522 100644
--- a/patches/unapplied/server/Configurable-baby-zombie-movement-speed.patch
+++ b/patches/server/Configurable-baby-zombie-movement-speed.patch
@@ -8,19 +8,20 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
-@@ -0,0 +0,0 @@ public class Zombie extends Monster {
+@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityTransformEvent;
+ public class Zombie extends Monster {
- private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
- private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.ADD_MULTIPLIED_BASE);
-+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.id(), SPEED_MODIFIER_BABY.name(), this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.operation()); // Paper - Make baby speed configurable
- private static final EntityDataAccessor<Boolean> DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
- private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT);
- public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
+ private static final ResourceLocation SPEED_MODIFIER_BABY_ID = ResourceLocation.withDefaultNamespace("baby");
+- private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_ID, 0.5D, AttributeModifier.Operation.ADD_MULTIPLIED_BASE);
++ private final AttributeModifier babyModifier = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_ID, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, AttributeModifier.Operation.ADD_MULTIPLIED_BASE); // Paper - Make baby speed configurable
+ private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge");
+ private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier(ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05000000074505806D, AttributeModifier.Operation.ADD_VALUE);
+ private static final ResourceLocation LEADER_ZOMBIE_BONUS_ID = ResourceLocation.withDefaultNamespace("leader_zombie_bonus");
@@ -0,0 +0,0 @@ public class Zombie extends Monster {
if (this.level() != null && !this.level().isClientSide) {
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
-- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY.id());
+- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY_ID);
+ attributemodifiable.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable
if (baby) {
- attributemodifiable.addTransientModifier(Zombie.SPEED_MODIFIER_BABY);
diff --git a/patches/unapplied/server/Configurable-cactus-bamboo-and-reed-growth-height.patch b/patches/server/Configurable-cactus-bamboo-and-reed-growth-height.patch
index 63509d396a..63509d396a 100644
--- a/patches/unapplied/server/Configurable-cactus-bamboo-and-reed-growth-height.patch
+++ b/patches/server/Configurable-cactus-bamboo-and-reed-growth-height.patch
diff --git a/patches/unapplied/server/Configurable-container-update-tick-rate.patch b/patches/server/Configurable-container-update-tick-rate.patch
index 0bbbefb612..352487861d 100644
--- a/patches/unapplied/server/Configurable-container-update-tick-rate.patch
+++ b/patches/server/Configurable-container-update-tick-rate.patch
@@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public final Object object;
private int containerCounter;
public boolean wonGame;
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
--this.invulnerableTime;
}
diff --git a/patches/server/Configurable-end-credits.patch b/patches/server/Configurable-end-credits.patch
new file mode 100644
index 0000000000..df984bbba2
--- /dev/null
+++ b/patches/server/Configurable-end-credits.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: DoctorDark <[email protected]>
+Date: Wed, 16 Mar 2016 02:21:39 -0500
+Subject: [PATCH] Configurable end credits
+
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
+--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
+ this.unRide();
+ this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
+ if (!this.wonGame) {
++ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits
+ this.wonGame = true;
+ this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 0.0F));
+ this.seenCredits = true;
diff --git a/patches/unapplied/server/Configurable-fishing-time-ranges.patch b/patches/server/Configurable-fishing-time-ranges.patch
index 6dac131fb7..0a2b1e6c0a 100644
--- a/patches/unapplied/server/Configurable-fishing-time-ranges.patch
+++ b/patches/server/Configurable-fishing-time-ranges.patch
@@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -0,0 +0,0 @@ public class FishingHook extends Projectile {
this.noCulling = true;
- this.luck = Math.max(0, luckOfTheSeaLevel);
- this.lureSpeed = Math.max(0, lureLevel);
+ this.luck = Math.max(0, luckBonus);
+ this.lureSpeed = Math.max(0, waitTimeReductionTicks);
+ // Paper start - Configurable fishing time ranges
+ minWaitTime = world.paperConfig().fishingTimeRange.minimum;
+ maxWaitTime = world.paperConfig().fishingTimeRange.maximum;
@@ -23,8 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else {
// CraftBukkit start - logic to modify fishing wait time
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
-- this.timeUntilLured -= (this.applyLure) ? this.lureSpeed * 20 * 5 : 0;
-+ this.timeUntilLured -= (this.applyLure) ? (this.lureSpeed * 20 * 5 >= this.maxWaitTime ? this.timeUntilLured - 1 : this.lureSpeed * 20 * 5) : 0; // Paper - Fix Lure infinite loop
+- this.timeUntilLured -= (this.applyLure) ? this.lureSpeed : 0;
++ this.timeUntilLured -= (this.applyLure) ? (this.lureSpeed >= this.maxWaitTime ? this.timeUntilLured - 1 : this.lureSpeed ) : 0; // Paper - Fix Lure infinite loop
// CraftBukkit end
}
}
diff --git a/patches/unapplied/server/Configurable-mob-spawner-tick-rate.patch b/patches/server/Configurable-mob-spawner-tick-rate.patch
index 3081039152..3081039152 100644
--- a/patches/unapplied/server/Configurable-mob-spawner-tick-rate.patch
+++ b/patches/server/Configurable-mob-spawner-tick-rate.patch
diff --git a/patches/unapplied/server/Configurable-top-of-nether-void-damage.patch b/patches/server/Configurable-top-of-nether-void-damage.patch
index 045574b847..0f77d7fb1d 100644
--- a/patches/unapplied/server/Configurable-top-of-nether-void-damage.patch
+++ b/patches/server/Configurable-top-of-nether-void-damage.patch
@@ -27,14 +27,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -0,0 +0,0 @@ public class PortalForcer {
- Optional<PoiRecord> optional = villageplace.getInSquare((holder) -> {
- return holder.is(PoiTypes.NETHER_PORTAL);
- }, blockposition, i, PoiManager.Occupancy.ANY).filter((villageplacerecord) -> {
-- return worldborder.isWithinBounds(villageplacerecord.getPos());
-+ return worldborder.isWithinBounds(villageplacerecord.getPos()) && !(this.level.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> villageplacerecord.getPos().getY() >= v)); // Paper - Configurable nether ceiling damage
- }).sorted(Comparator.comparingDouble((PoiRecord villageplacerecord) -> { // CraftBukkit - decompile error
- return villageplacerecord.getPos().distSqr(blockposition);
- }).thenComparingInt((villageplacerecord) -> {
+ }, blockposition, i, PoiManager.Occupancy.ANY).map(PoiRecord::getPos);
+
+ Objects.requireNonNull(worldborder);
+- return stream.filter(worldborder::isWithinBounds).filter((blockposition1) -> {
++ return stream.filter(worldborder::isWithinBounds).filter(pos -> !(this.level.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> pos.getY() >= v))).filter((blockposition1) -> { // Paper - Configurable nether ceiling damage
+ return this.level.getBlockState(blockposition1).hasProperty(BlockStateProperties.HORIZONTAL_AXIS);
+ }).min(Comparator.comparingDouble((BlockPos blockposition1) -> { // CraftBukkit - decompile error
+ return blockposition1.distSqr(blockposition);
@@ -0,0 +0,0 @@ public class PortalForcer {
BlockPos blockposition2 = null;
WorldBorder worldborder = this.level.getWorldBorder();
@@ -44,6 +44,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ i = Math.min(i, this.level.paperConfig().environment.netherCeilingVoidDamageHeight.intValue() - 1);
+ }
+ // Paper end - Configurable nether ceiling damage
+ boolean flag = true;
BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable();
Iterator iterator = BlockPos.spiralAround(blockposition, createRadius, Direction.EAST, Direction.SOUTH).iterator(); // CraftBukkit
-
diff --git a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
index 8dbd0f7fec..8dbd0f7fec 100644
--- a/patches/unapplied/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
+++ b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
diff --git a/patches/unapplied/server/Disable-explosion-knockback.patch b/patches/server/Disable-explosion-knockback.patch
index 44b6e9a6fe..5b2cdcb3de 100644
--- a/patches/unapplied/server/Disable-explosion-knockback.patch
+++ b/patches/server/Disable-explosion-knockback.patch
@@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (entity instanceof LivingEntity) {
LivingEntity entityliving = (LivingEntity) entity;
-- d13 = ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12);
-+ d13 = entity instanceof Player && level.paperConfig().environment.disableExplosionKnockback ? 0 : ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12); // Paper - Option to disable explosion knockback
+- d13 = d12 * (1.0D - entityliving.getAttributeValue(Attributes.EXPLOSION_KNOCKBACK_RESISTANCE));
++ d13 = entity instanceof Player && this.level.paperConfig().environment.disableExplosionKnockback ? 0 : d12 * (1.0D - entityliving.getAttributeValue(Attributes.EXPLOSION_KNOCKBACK_RESISTANCE));
} else {
d13 = d12;
}
diff --git a/patches/unapplied/server/Disable-ice-and-snow.patch b/patches/server/Disable-ice-and-snow.patch
index 996216c844..996216c844 100644
--- a/patches/unapplied/server/Disable-ice-and-snow.patch
+++ b/patches/server/Disable-ice-and-snow.patch
diff --git a/patches/unapplied/server/Disable-spigot-tick-limiters.patch b/patches/server/Disable-spigot-tick-limiters.patch
index 85e738f21d..85e738f21d 100644
--- a/patches/unapplied/server/Disable-spigot-tick-limiters.patch
+++ b/patches/server/Disable-spigot-tick-limiters.patch
diff --git a/patches/unapplied/server/Disable-thunder.patch b/patches/server/Disable-thunder.patch
index 9cb40b734f..9cb40b734f 100644
--- a/patches/unapplied/server/Disable-thunder.patch
+++ b/patches/server/Disable-thunder.patch
diff --git a/patches/unapplied/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch
index 0374b5c0a4..d28b3d1482 100644
--- a/patches/unapplied/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch
+++ b/patches/server/Drop-falling-block-and-tnt-entities-at-the-specified.patch
@@ -23,15 +23,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return;
+ }
+ // Paper end - Configurable falling blocks height nerf
- if (!this.level().isClientSide) {
+ this.handlePortal();
+ if (!this.level().isClientSide && (this.isAlive() || this.forceTickAfterTeleportToDuplicate)) {
BlockPos blockposition = this.blockPosition();
- boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -0,0 +0,0 @@ public class PrimedTnt extends Entity implements TraceableEntity {
- if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot
+ this.handlePortal();
this.applyGravity();
this.move(MoverType.SELF, this.getDeltaMovement());
+ // Paper start - Configurable TNT height nerf
diff --git a/patches/unapplied/server/Entity-Origin-API.patch b/patches/server/Entity-Origin-API.patch
index 80f5060ffe..80f5060ffe 100644
--- a/patches/unapplied/server/Entity-Origin-API.patch
+++ b/patches/server/Entity-Origin-API.patch
diff --git a/patches/unapplied/server/Expose-server-CommandMap.patch b/patches/server/Expose-server-CommandMap.patch
index f627a40431..f627a40431 100644
--- a/patches/unapplied/server/Expose-server-CommandMap.patch
+++ b/patches/server/Expose-server-CommandMap.patch
diff --git a/patches/unapplied/server/Expose-server-build-information.patch b/patches/server/Expose-server-build-information.patch
index 8076dd2679..d8e55aad30 100644
--- a/patches/unapplied/server/Expose-server-build-information.patch
+++ b/patches/server/Expose-server-build-information.patch
@@ -610,7 +610,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static boolean useConsole = true;
@@ -0,0 +0,0 @@ public class Main {
- deadline.add(Calendar.DAY_OF_YEAR, -21);
+ deadline.add(Calendar.DAY_OF_YEAR, -3);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
diff --git a/patches/unapplied/server/Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/Fix-lag-from-explosions-processing-dead-entities.patch
index 09dabeaadd..09dabeaadd 100644
--- a/patches/unapplied/server/Fix-lag-from-explosions-processing-dead-entities.patch
+++ b/patches/server/Fix-lag-from-explosions-processing-dead-entities.patch
diff --git a/patches/unapplied/server/Further-improve-server-tick-loop.patch b/patches/server/Further-improve-server-tick-loop.patch
index 2f9095f42c..2f9095f42c 100644
--- a/patches/unapplied/server/Further-improve-server-tick-loop.patch
+++ b/patches/server/Further-improve-server-tick-loop.patch
diff --git a/patches/unapplied/server/Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/Handle-plugin-prefixes-using-Log4J-configuration.patch
index 0001b021cc..0001b021cc 100644
--- a/patches/unapplied/server/Handle-plugin-prefixes-using-Log4J-configuration.patch
+++ b/patches/server/Handle-plugin-prefixes-using-Log4J-configuration.patch
diff --git a/patches/unapplied/server/Hook-into-CB-plugin-rewrites.patch b/patches/server/Hook-into-CB-plugin-rewrites.patch
index d1b425ee4d..efb8e9cae0 100644
--- a/patches/unapplied/server/Hook-into-CB-plugin-rewrites.patch
+++ b/patches/server/Hook-into-CB-plugin-rewrites.patch
@@ -28,8 +28,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
@@ -0,0 +0,0 @@ public class Commodore {
- private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
+ private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
+ // Paper start - Plugin rewrites
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
diff --git a/patches/unapplied/server/Implement-PlayerLocaleChangeEvent.patch b/patches/server/Implement-PlayerLocaleChangeEvent.patch
index a967559137..2d670e13bf 100644
--- a/patches/unapplied/server/Implement-PlayerLocaleChangeEvent.patch
+++ b/patches/server/Implement-PlayerLocaleChangeEvent.patch
@@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
private int levitationStartTime;
private boolean disconnected;
private int requestedViewDistance;
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
@Nullable
private Vec3 startingToFallPosition;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.lastActionTime = Util.getMillis();
this.recipeBook = new ServerRecipeBook();
this.requestedViewDistance = 2;
@@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.lastSectionPos = SectionPos.of(0, 0, 0);
this.chunkTrackingView = ChunkTrackingView.EMPTY;
this.respawnDimension = Level.OVERWORLD;
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
diff --git a/patches/unapplied/server/Improve-Log4J-Configuration-Plugin-Loggers.patch b/patches/server/Improve-Log4J-Configuration-Plugin-Loggers.patch
index 4cd4de018f..4cd4de018f 100644
--- a/patches/unapplied/server/Improve-Log4J-Configuration-Plugin-Loggers.patch
+++ b/patches/server/Improve-Log4J-Configuration-Plugin-Loggers.patch
diff --git a/patches/unapplied/server/Improve-Player-chat-API-handling.patch b/patches/server/Improve-Player-chat-API-handling.patch
index ec17e80cb3..ec17e80cb3 100644
--- a/patches/unapplied/server/Improve-Player-chat-API-handling.patch
+++ b/patches/server/Improve-Player-chat-API-handling.patch
diff --git a/patches/unapplied/server/MC-Dev-fixes.patch b/patches/server/MC-Dev-fixes.patch
index 85b9daf2b6..85b9daf2b6 100644
--- a/patches/unapplied/server/MC-Dev-fixes.patch
+++ b/patches/server/MC-Dev-fixes.patch
diff --git a/patches/unapplied/server/MC-Utils.patch b/patches/server/MC-Utils.patch
index cae05842d3..e763bc3082 100644
--- a/patches/unapplied/server/MC-Utils.patch
+++ b/patches/server/MC-Utils.patch
@@ -6128,9 +6128,9 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/mai
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
- private final AtomicReferenceArray<CompletableFuture<ChunkResult<ChunkAccess>>> futures;
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
+ public static final ChunkResult<LevelChunk> UNLOADED_LEVEL_CHUNK = ChunkResult.error("Unloaded level chunk");
+ private static final CompletableFuture<ChunkResult<LevelChunk>> UNLOADED_LEVEL_CHUNK_FUTURE = CompletableFuture.completedFuture(ChunkHolder.UNLOADED_LEVEL_CHUNK);
private final LevelHeightAccessor levelHeightAccessor;
- private volatile CompletableFuture<ChunkResult<LevelChunk>> fullChunkFuture;
- private volatile CompletableFuture<ChunkResult<LevelChunk>> tickingChunkFuture;
@@ -6138,12 +6138,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private volatile CompletableFuture<ChunkResult<LevelChunk>> fullChunkFuture; private int fullChunkCreateCount; private volatile boolean isFullChunkReady; // Paper - cache chunk ticking stage
+ private volatile CompletableFuture<ChunkResult<LevelChunk>> tickingChunkFuture; private volatile boolean isTickingReady; // Paper - cache chunk ticking stage
+ private volatile CompletableFuture<ChunkResult<LevelChunk>> entityTickingChunkFuture; private volatile boolean isEntityTickingReady; // Paper - cache chunk ticking stage
- private CompletableFuture<ChunkAccess> chunkToSave;
- @Nullable
- private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- private CompletableFuture<Void> pendingFullStateConfirmation;
+ public int oldTicketLevel;
+ private int ticketLevel;
+ private int queueLevel;
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
private CompletableFuture<?> sendSync;
+ private CompletableFuture<?> saveSync;
+ private final ChunkMap chunkMap; // Paper
+
@@ -6158,9 +6158,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) {
- this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size());
+ super(pos);
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
-@@ -0,0 +0,0 @@ public class ChunkHolder {
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
this.queueLevel = this.oldTicketLevel;
this.setTicketLevel(level);
this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()];
@@ -6183,10 +6183,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
// CraftBukkit start
public LevelChunk getFullChunkNow() {
- // Note: We use the oldTicketLevel for isLoaded checks.
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- return ChunkLevel.generationStatus(this.ticketLevel).isOrAfter(leastStatus) ? this.getFutureIfPresentUnchecked(leastStatus) : ChunkHolder.UNLOADED_CHUNK_FUTURE;
+ return (LevelChunk) this.getChunkIfPresent(ChunkStatus.FULL);
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
}
+ // CraftBukkit end
- public CompletableFuture<ChunkResult<LevelChunk>> getTickingChunkFuture() {
+ public final CompletableFuture<ChunkResult<LevelChunk>> getTickingChunkFuture() { // Paper - final for inline
@@ -6209,8 +6209,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
}
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- return null;
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
+
}
+ // Paper start
@@ -6228,39 +6228,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
+
- @Nullable
- public ChunkAccess getLastAvailable() {
- for (int i = ChunkHolder.CHUNK_STATUSES.size() - 1; i >= 0; --i) {
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- return null;
+ public CompletableFuture<?> getSaveSyncFuture() {
+ return this.saveSync;
}
-
-- public CompletableFuture<ChunkAccess> getChunkToSave() {
-+ public final CompletableFuture<ChunkAccess> getChunkToSave() { // Paper - final for inline
- return this.chunkToSave;
- }
-
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- return ChunkLevel.fullStatus(this.ticketLevel);
- }
-
-- public ChunkPos getPos() {
-+ public final ChunkPos getPos() { // Paper - final for inline
- return this.pos;
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
}
+ @Override
- public int getTicketLevel() {
+ public final int getTicketLevel() { // Paper - final for inline
return this.ticketLevel;
}
-@@ -0,0 +0,0 @@ public class ChunkHolder {
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
- this.wasAccessibleSinceLastSave |= flag3;
- if (!flag2 && flag3) {
+ this.wasAccessibleSinceLastSave |= flag1;
+ if (!flag && flag1) {
+ int expectCreateCount = ++this.fullChunkCreateCount; // Paper
- this.fullChunkFuture = chunkStorage.prepareAccessibleChunk(this);
- this.scheduleFullChunkPromotion(chunkStorage, this.fullChunkFuture, executor, FullChunkStatus.FULL);
+ this.fullChunkFuture = chunkLoadingManager.prepareAccessibleChunk(this);
+ this.scheduleFullChunkPromotion(chunkLoadingManager, this.fullChunkFuture, executor, FullChunkStatus.FULL);
+ // Paper start - cache ticking ready status
+ this.fullChunkFuture.thenAccept(chunkResult -> {
+ chunkResult.ifSuccess(chunk -> {
@@ -6270,10 +6256,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ });
+ });
- this.updateChunkToSave(this.fullChunkFuture, "full");
++ // Paper end - cache ticking ready status
+ this.addSaveDependency(this.fullChunkFuture);
}
- if (flag2 && !flag3) {
+ if (flag && !flag1) {
+ // Paper start
+ if (this.isFullChunkReady) {
+ io.papermc.paper.chunk.system.ChunkSystem.onChunkNotBorder(this.fullChunkFuture.join().orElseThrow(IllegalStateException::new), this); // Paper
@@ -6281,15 +6268,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
-+ ++this.fullChunkCreateCount; // Paper - cache ticking ready status
-+ this.isFullChunkReady = false; // Paper - cache ticking ready status
}
-
- boolean flag4 = fullchunkstatus.isOrAfter(FullChunkStatus.BLOCK_TICKING);
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- if (!flag4 && flag5) {
- this.tickingChunkFuture = chunkStorage.prepareTickingChunk(this);
- this.scheduleFullChunkPromotion(chunkStorage, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
+ if (!flag2 && flag3) {
+ this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this);
+ this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
+ // Paper start - cache ticking ready status
+ this.tickingChunkFuture.thenAccept(chunkResult -> {
+ chunkResult.ifSuccess(chunk -> {
@@ -6299,10 +6282,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ });
+ });
+ // Paper end
- this.updateChunkToSave(this.tickingChunkFuture, "ticking");
+ this.addSaveDependency(this.tickingChunkFuture);
}
- if (flag4 && !flag5) {
+ if (flag2 && !flag3) {
- this.tickingChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
+ // Paper start
+ if (this.isTickingReady) {
@@ -6313,10 +6296,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
}
-@@ -0,0 +0,0 @@ public class ChunkHolder {
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
- this.entityTickingChunkFuture = chunkStorage.prepareEntityTickingChunk(this);
- this.scheduleFullChunkPromotion(chunkStorage, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
+ this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this);
+ this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
+ // Paper start - cache ticking ready status
+ this.entityTickingChunkFuture.thenAccept(chunkResult -> {
+ chunkResult.ifSuccess(chunk -> {
@@ -6325,10 +6308,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ });
+ });
+ // Paper end
- this.updateChunkToSave(this.entityTickingChunkFuture, "entity ticking");
+ this.addSaveDependency(this.entityTickingChunkFuture);
}
- if (flag6 && !flag7) {
+ if (flag4 && !flag5) {
- this.entityTickingChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
+ // Paper start
+ if (this.isEntityTickingReady) {
@@ -6339,9 +6322,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.entityTickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
}
-@@ -0,0 +0,0 @@ public class ChunkHolder {
- private static record ChunkSaveDebug(Thread thread, CompletableFuture<?> future, String source) {
+@@ -0,0 +0,0 @@ public class ChunkHolder extends GenerationChunkHolder {
+ List<ServerPlayer> getPlayers(ChunkPos chunkPos, boolean onlyOnWatchDistanceEdge);
}
+
+ // Paper start
@@ -6426,9 +6409,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
super(new RegionStorageInfo(session.getLevelId(), world.dimension(), "chunk"), session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
this.visibleChunkMap = this.updatingChunkMap.clone();
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- this.poiManager = new PoiManager(new RegionStorageInfo(session.getLevelId(), world.dimension(), "poi"), path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
+ this.poiManager = new PoiManager(new RegionStorageInfo(session.getLevelId(), world.dimension(), "poi"), path.resolve("poi"), dataFixer, dsync, iregistrycustom, world.getServer(), world);
this.setServerViewDistance(viewDistance);
- this.worldGenContext = new WorldGenContext(world, chunkGenerator, structureTemplateManager, this.lightEngine);
+ this.worldGenContext = new WorldGenContext(world, chunkGenerator, structureTemplateManager, this.lightEngine, this.mainThreadMailbox);
+ // Paper start
+ this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new);
+ this.regionManagers.add(this.dataRegionManager);
@@ -6441,21 +6424,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public final io.papermc.paper.util.player.NearbyPlayers getNearbyPlayers() {
+ return this.nearbyPlayers;
}
-+ // Paper end
-
- protected ChunkGenerator generator() {
- return this.generator;
-@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- });
- }
+ public int getMobCountNear(final ServerPlayer player, final net.minecraft.world.entity.MobCategory mobCategory) {
+ return -1;
+ }
++ // Paper end
+
- private static double euclideanDistanceSquared(ChunkPos pos, Entity entity) {
- double d0 = (double) SectionPos.sectionToBlockCoord(pos.x, 8);
- double d1 = (double) SectionPos.sectionToBlockCoord(pos.z, 8);
+ protected ChunkGenerator generator() {
+ return this.worldGenContext.generator();
+ }
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
};
@@ -6511,9 +6488,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private void processUnloads(BooleanSupplier shouldKeepTicking) {
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
+ }
- if (playerchunk != null) {
+ this.updatingChunkMap.remove(j);
+ playerchunk.onChunkRemove(); // Paper
this.pendingUnloads.put(j, playerchunk);
this.modified = true;
@@ -6528,18 +6505,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) {
if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) {
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- if (completablefuture1 != completablefuture) {
- this.scheduleUnload(pos, holder);
} else {
+ ChunkAccess ichunkaccess = holder.getLatestChunk();
+
- if (this.pendingUnloads.remove(pos, holder) && ichunkaccess != null) {
+ // Paper start
+ boolean removed;
+ if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) {
+ io.papermc.paper.chunk.system.ChunkSystem.onChunkHolderDelete(this.level, holder);
+ // Paper end
+ LevelChunk chunk;
+
if (ichunkaccess instanceof LevelChunk) {
- ((LevelChunk) ichunkaccess).setLoaded(false);
- }
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.lightEngine.tryScheduleUpdate();
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
@@ -6599,8 +6576,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ long i = playerchunk.pos.toLong(); // Paper
ChunkPos chunkcoordintpair = new ChunkPos(i);
- ChunkHolder playerchunk = (ChunkHolder) entry.getValue();
-+ // Paper
- Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLastAvailable());
++ // Paper - move up
+ Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLatestChunk());
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -6667,8 +6644,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public void removeTicketsOnClosing() {
-- ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT, TicketType.LIGHT);
-+ ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT, TicketType.LIGHT, TicketType.FUTURE_AWAIT); // Paper - add additional tickets to preserve
+- ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT);
++ ImmutableSet<TicketType<?>> immutableset = ImmutableSet.of(TicketType.UNKNOWN, TicketType.POST_TELEPORT, TicketType.FUTURE_AWAIT); // Paper - add additional tickets to preserve
ObjectIterator<Entry<SortedArraySet<Ticket<?>>>> objectiterator = this.tickets.long2ObjectEntrySet().fastIterator();
while (objectiterator.hasNext()) {
@@ -6953,7 +6930,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public boolean sentListPacket = false;
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
// CraftBukkit end
@@ -6962,7 +6939,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
+@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.updateOptions(clientOptions);
this.object = null;
@@ -6988,7 +6965,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -0,0 +0,0 @@ public class WorldGenRegion implements WorldGenLevel {
- return chunkX >= this.firstPos.x && chunkX <= this.lastPos.x && chunkZ >= this.firstPos.z && chunkZ <= this.lastPos.z;
+ return k < this.generatingStep.directDependencies().size();
}
+ // Paper start - if loaded util
@@ -7076,7 +7053,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
return this.target;
}
diff --git a/patches/unapplied/server/Only-refresh-abilities-if-needed.patch b/patches/server/Only-refresh-abilities-if-needed.patch
index 65ca592a39..65ca592a39 100644
--- a/patches/unapplied/server/Only-refresh-abilities-if-needed.patch
+++ b/patches/server/Only-refresh-abilities-if-needed.patch
diff --git a/patches/unapplied/server/Optimize-explosions.patch b/patches/server/Optimize-explosions.patch
index f0551fd4e4..f0551fd4e4 100644
--- a/patches/unapplied/server/Optimize-explosions.patch
+++ b/patches/server/Optimize-explosions.patch
diff --git a/patches/unapplied/server/Paper-Metrics.patch b/patches/server/Paper-Metrics.patch
index 8fcd6a8977..8fcd6a8977 100644
--- a/patches/unapplied/server/Paper-Metrics.patch
+++ b/patches/server/Paper-Metrics.patch
diff --git a/patches/unapplied/server/Paper-Plugins.patch b/patches/server/Paper-Plugins.patch
index b95bb91b25..b95bb91b25 100644
--- a/patches/unapplied/server/Paper-Plugins.patch
+++ b/patches/server/Paper-Plugins.patch
diff --git a/patches/unapplied/server/Paper-command.patch b/patches/server/Paper-command.patch
index aeb9335d10..aeb9335d10 100644
--- a/patches/unapplied/server/Paper-command.patch
+++ b/patches/server/Paper-command.patch
diff --git a/patches/unapplied/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch
index a6c4b5c81c..2e4f4e526a 100644
--- a/patches/unapplied/server/Paper-config-files.patch
+++ b/patches/server/Paper-config-files.patch
@@ -24,8 +24,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
implementation("commons-lang:commons-lang:2.6")
- runtimeOnly("org.xerial:sqlite-jdbc:3.45.3.0")
- runtimeOnly("com.mysql:mysql-connector-j:8.3.0")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
diff --git a/patches/unapplied/server/Player-Tab-List-and-Title-APIs.patch b/patches/server/Player-Tab-List-and-Title-APIs.patch
index bb19cc9a3f..bb19cc9a3f 100644
--- a/patches/unapplied/server/Player-Tab-List-and-Title-APIs.patch
+++ b/patches/server/Player-Tab-List-and-Title-APIs.patch
diff --git a/patches/unapplied/server/Player-affects-spawning-API.patch b/patches/server/Player-affects-spawning-API.patch
index 54d5a7dfe5..7f70948768 100644
--- a/patches/unapplied/server/Player-affects-spawning-API.patch
+++ b/patches/server/Player-affects-spawning-API.patch
@@ -24,7 +24,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/n
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -0,0 +0,0 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
@@ -77,9 +77,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
- @Nullable
public Entity currentExplosionCause;
- public boolean ignoreFallDamageFromCurrentImpulse;
+ private boolean ignoreFallDamageFromCurrentImpulse;
+ private int currentImpulseContextResetGraceTime;
+ public boolean affectsSpawning = true; // Paper - Affects Spawning API
// CraftBukkit start
diff --git a/patches/unapplied/server/Plugin-remapping.patch b/patches/server/Plugin-remapping.patch
index 3f7ba83c8f..3f7ba83c8f 100644
--- a/patches/unapplied/server/Plugin-remapping.patch
+++ b/patches/server/Plugin-remapping.patch
diff --git a/patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch b/patches/server/Prevent-block-entity-and-entity-crashes.patch
index d7cb9358b7..d7cb9358b7 100644
--- a/patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch
+++ b/patches/server/Prevent-block-entity-and-entity-crashes.patch
diff --git a/patches/unapplied/server/Remap-fixes.patch b/patches/server/Remap-fixes.patch
index aac272411d..b636a13b75 100644
--- a/patches/unapplied/server/Remap-fixes.patch
+++ b/patches/server/Remap-fixes.patch
@@ -89,9 +89,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@EnumSource(DyeColor.class)
public void checkColor(DyeColor dye) {
Color color = dye.getColor();
-- float[] nmsColorArray = DyeColor.byId(dye.getWoolData()).getTextureDiffuseColors();
-+ float[] nmsColorArray = net.minecraft.world.item.DyeColor.byId(dye.getWoolData()).getTextureDiffuseColors(); // Paper - remap fix
- Color nmsColor = Color.fromRGB((int) (nmsColorArray[0] * 255), (int) (nmsColorArray[1] * 255), (int) (nmsColorArray[2] * 255));
+- int nmsColorArray = DyeColor.byId(dye.getWoolData()).getTextureDiffuseColor();
++ int nmsColorArray = net.minecraft.world.item.DyeColor.byId(dye.getWoolData()).getTextureDiffuseColors(); // Paper - remap fix
+ Color nmsColor = Color.fromARGB(nmsColorArray);
assertThat(color, is(nmsColor));
}
@@ -0,0 +0,0 @@ public class DyeColorsTest extends AbstractTestingBase {
diff --git a/patches/unapplied/server/Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/Remap-reflection-calls-in-plugins-using-internals.patch
index aca029594b..8cdae74b74 100644
--- a/patches/unapplied/server/Remap-reflection-calls-in-plugins-using-internals.patch
+++ b/patches/server/Remap-reflection-calls-in-plugins-using-internals.patch
@@ -649,7 +649,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -0,0 +0,0 @@ public class Commodore {
- private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
+ private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
// Paper start - Plugin rewrites
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
diff --git a/patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
index 584d5d2186..584d5d2186 100644
--- a/patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
+++ b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
diff --git a/patches/unapplied/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch
index baaf3e6133..eb843b5c56 100644
--- a/patches/unapplied/server/Setup-Gradle-project.patch
+++ b/patches/server/Setup-Gradle-project.patch
@@ -47,8 +47,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("commons-lang:commons-lang:2.6")
-+ runtimeOnly("org.xerial:sqlite-jdbc:3.45.3.0")
-+ runtimeOnly("com.mysql:mysql-connector-j:8.3.0")
++ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
++ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
+
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
@@ -61,7 +61,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+}
+
+paperweight {
-+ craftBukkitPackageVersion.set("v1_20_R4") // also needs to be updated in MappingEnvironment
++ craftBukkitPackageVersion.set("v1_21_R1") // also needs to be updated in MappingEnvironment
+}
+
+tasks.jar {
@@ -170,7 +170,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId>
- <packaging>jar</packaging>
-- <version>1.20.6-R0.1-SNAPSHOT</version>
+- <version>1.21-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
-
@@ -186,7 +186,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <api.version>unknown</api.version>
- <bt.name>git</bt.name>
-- <minecraft_version>1_20_R4</minecraft_version>
+- <minecraft_version>1_21_R1</minecraft_version>
- <maven.compiler.release>21</maven.compiler.release>
- </properties>
-
@@ -251,7 +251,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency>
- <groupId>com.mojang</groupId>
- <artifactId>datafixerupper</artifactId>
-- <version>7.0.14</version>
+- <version>8.0.16</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
@@ -405,13 +405,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <dependency>
- <groupId>org.xerial</groupId>
- <artifactId>sqlite-jdbc</artifactId>
-- <version>3.45.3.0</version>
+- <version>3.46.0.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>com.mysql</groupId>
- <artifactId>mysql-connector-j</artifactId>
-- <version>8.3.0</version>
+- <version>8.4.0</version>
- <scope>runtime</scope>
- </dependency>
- <!-- add these back in as they are not exposed by the API -->
diff --git a/patches/unapplied/server/Support-components-in-ItemMeta.patch b/patches/server/Support-components-in-ItemMeta.patch
index 55d923667b..55d923667b 100644
--- a/patches/unapplied/server/Support-components-in-ItemMeta.patch
+++ b/patches/server/Support-components-in-ItemMeta.patch
diff --git a/patches/unapplied/server/Test-changes.patch b/patches/server/Test-changes.patch
index 8d0763841b..8d0763841b 100644
--- a/patches/unapplied/server/Test-changes.patch
+++ b/patches/server/Test-changes.patch
diff --git a/patches/unapplied/server/Timings-v2.patch b/patches/server/Timings-v2.patch
index f61a23f95d..5ce5e577e6 100644
--- a/patches/unapplied/server/Timings-v2.patch
+++ b/patches/server/Timings-v2.patch
@@ -724,7 +724,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
- public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
+ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable {
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
@@ -1243,7 +1243,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.ackBlockChangesUpTo = -1;
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
- this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
+ this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
}
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
@@ -1304,7 +1304,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
+@@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Hanging;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Vehicle;
diff --git a/patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch
index eee7351b2e..5d4b973a8a 100644
--- a/patches/unapplied/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch
+++ b/patches/server/Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch
@@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/build.gradle.kts
@@ -0,0 +0,0 @@ dependencies {
implementation("commons-lang:commons-lang:2.6")
- runtimeOnly("org.xerial:sqlite-jdbc:3.45.3.0")
- runtimeOnly("com.mysql:mysql-connector-j:8.3.0")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
diff --git a/patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch
index 520144345d..b4afe349c7 100644
--- a/patches/unapplied/server/Use-TerminalConsoleAppender-for-console-improvements.patch
+++ b/patches/server/Use-TerminalConsoleAppender-for-console-improvements.patch
@@ -263,9 +263,9 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -0,0 +0,0 @@ import org.slf4j.Logger;
- import com.mojang.serialization.Dynamic;
+@@ -0,0 +0,0 @@ import com.mojang.serialization.Dynamic;
import com.mojang.serialization.Lifecycle;
+ import java.io.File;
import java.util.Random;
-import jline.console.ConsoleReader;
+// import jline.console.ConsoleReader; // Paper
diff --git a/patches/unapplied/server/Use-UserCache-for-player-heads.patch b/patches/server/Use-UserCache-for-player-heads.patch
index 783d63b915..783d63b915 100644
--- a/patches/unapplied/server/Use-UserCache-for-player-heads.patch
+++ b/patches/server/Use-UserCache-for-player-heads.patch
diff --git a/patches/unapplied/server/Add-configurable-portal-search-radius.patch b/patches/unapplied/server/Add-configurable-portal-search-radius.patch
deleted file mode 100644
index eb68337a7a..0000000000
--- a/patches/unapplied/server/Add-configurable-portal-search-radius.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Joseph Hirschfeld <[email protected]>
-Date: Thu, 3 Mar 2016 02:46:17 -0600
-Subject: [PATCH] Add configurable portal search radius
-
-
-diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/world/entity/Entity.java
-+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
- BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
- // CraftBukkit start
-- CraftPortalEvent event = this.callPortalEvent(this, destination, new Vec3(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16);
-+ // Paper start - Configurable portal search radius
-+ int portalSearchRadius = destination.paperConfig().environment.portalSearchRadius;
-+ if (level.paperConfig().environment.portalSearchVanillaDimensionScaling && flag2) { // == THE_NETHER
-+ portalSearchRadius = (int) (portalSearchRadius / destination.dimensionType().coordinateScale());
-+ }
-+ // Paper end - Configurable portal search radius
-+ CraftPortalEvent event = this.callPortalEvent(this, destination, new Vec3(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, destination.paperConfig().environment.portalCreateRadius); // Paper start - configurable portal radius
- if (event == null) {
- return null;
- }
-diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
-+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
-@@ -0,0 +0,0 @@ public class PortalForcer {
-
- public Optional<BlockUtil.FoundRectangle> findPortalAround(BlockPos pos, boolean destIsNether, WorldBorder worldBorder) {
- // CraftBukkit start
-- return this.findPortalAround(pos, worldBorder, destIsNether ? 16 : 128); // Search Radius
-+ return this.findPortalAround(pos, worldBorder, destIsNether ? level.paperConfig().environment.portalCreateRadius : level.paperConfig().environment.portalSearchRadius); // Search Radius // Paper - Configurable portal search radius
- }
-
- public Optional<BlockUtil.FoundRectangle> findPortalAround(BlockPos blockposition, WorldBorder worldborder, int i) {
diff --git a/patches/unapplied/server/Configurable-end-credits.patch b/patches/unapplied/server/Configurable-end-credits.patch
deleted file mode 100644
index 2c6555c73d..0000000000
--- a/patches/unapplied/server/Configurable-end-credits.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: DoctorDark <[email protected]>
-Date: Wed, 16 Mar 2016 02:21:39 -0500
-Subject: [PATCH] Configurable end credits
-
-
-diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
-+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
- this.unRide();
- this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
- if (!this.wonGame) {
-+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits
- this.wonGame = true;
- this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
- this.seenCredits = true;
diff --git a/patches/unapplied/server/Configurable-inter-world-teleportation-safety.patch b/patches/unapplied/server/Configurable-inter-world-teleportation-safety.patch
deleted file mode 100644
index 388370b1ab..0000000000
--- a/patches/unapplied/server/Configurable-inter-world-teleportation-safety.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Sudzzy <[email protected]>
-Date: Thu, 3 Mar 2016 02:50:31 -0600
-Subject: [PATCH] Configurable inter-world teleportation safety
-
-People are able to abuse the way Bukkit handles teleportation across worlds since it provides a built in teleportation
-safety check.
-
-To abuse the safety check, players are required to get into a location deemed unsafe by Bukkit e.g. be within a chest
-or door block. While they are in this block, they accept a teleport request from a player within a different world. Once
-the player teleports, Minecraft will recursively search upwards for a safe location, this could eventually land within a
-player's skybase.
-
-Example setup to perform the glitch: http://puu.sh/ng3PC/cf072dcbdb.png
-The wanted destination was on top of the emerald block however the player ended on top of the diamond block.
-This only is the case if the player is teleporting between worlds.
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
- entity.connection.teleport(to);
- } else {
- // The respawn reason should never be used if the passed location is non null.
-- this.server.getHandle().respawn(entity, toWorld, true, to, true, null);
-+ this.server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper
- }
- return true;
- }