mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@4781d28b Re-add Log4j Javadocs (#12693) PaperMC/Paper@74fbcce5 Check type of Material in get/set stats (#12607) PaperMC/Paper@4b3f967e Improve Fix MC-44654 (#12703) PaperMC/Paper@a7dd2635 Enable spigot obfuscation support (#12695) PaperMC/Paper@6a51c44e Cleanup Primed TNT Fix (#12704) PaperMC/Paper@839c6a18 Fix #11169 (#12706) PaperMC/Paper@c77d5f99 Fix MC-297591 PaperMC/Paper@219f86ee Implement chunk unload delay config option PaperMC/Paper@e4eb69b8 Do not allow ticket level decreases to be processed asynchronously PaperMC/Paper@71b0c768 Adds support for vanilla negative explosions (#12705) PaperMC/Paper@3750927a [ci/skip] Fix PermissionManager#clearPermissions() docs bad wording (#12657) PaperMC/Paper@d61a51e8 Add ItemType#getBurnDuration() (#12604) PaperMC/Paper@29fc8532 Allow empty paths in namespaced keys (#12687) PaperMC/Paper@4419afb9 fix: Safely handle nanosecond overflow in ClickCallback (#12686) PaperMC/Paper@56528821 Add `isProxyEnabled` method to ServerConfiguration (#12664) PaperMC/Paper@c0dda0ea Add `isForceDefaultGameMode` method (#12673) PaperMC/Paper@e714de63 Fix excess slot updates PaperMC/Paper@6d0821d2 [ci/skip] Fix docs for Spawner class and cleanup (#12710) PaperMC/Paper@cceffe3d Release ItemType and BlockType (#12708) PaperMC/Paper@186e9e33 Relocate CommandMap#registerServerAliases() call to after lifecycle events have been run (#12601)
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
|
||||
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
|
||||
@@ -995,6 +_,15 @@
|
||||
@@ -996,6 +_,15 @@
|
||||
|
||||
LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -42,7 +42,7 @@
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.spark.disable(); // Paper - spark
|
||||
@@ -1093,6 +_,8 @@
|
||||
@@ -1094,6 +_,8 @@
|
||||
this.safeShutdown(waitForServer, false);
|
||||
}
|
||||
public void safeShutdown(boolean waitForServer, boolean isRestarting) {
|
||||
@@ -51,7 +51,7 @@
|
||||
this.isRestarting = isRestarting;
|
||||
this.hasLoggedStop = true; // Paper - Debugging
|
||||
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
||||
@@ -1112,6 +_,7 @@
|
||||
@@ -1113,6 +_,7 @@
|
||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
private long lastTick = 0;
|
||||
private long catchupTime = 0;
|
||||
@@ -59,7 +59,7 @@
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -1197,6 +_,16 @@
|
||||
@@ -1198,6 +_,16 @@
|
||||
}
|
||||
// Paper end - Add onboarding message for initial server start
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
while (this.running) {
|
||||
long l;
|
||||
if (!this.isPaused() && this.tickRateManager.isSprinting() && this.tickRateManager.checkShouldSprintThisTick()) {
|
||||
@@ -1221,14 +_,19 @@
|
||||
@@ -1222,14 +_,19 @@
|
||||
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
|
||||
final long diff = currentTime - tickSection;
|
||||
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
@@ -99,7 +99,7 @@
|
||||
tickSection = currentTime;
|
||||
}
|
||||
// Paper end - further improve server tick loop
|
||||
@@ -1260,6 +_,12 @@
|
||||
@@ -1261,6 +_,12 @@
|
||||
profilerFiller.popPush("nextTickWait");
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + l, this.nextTickTimeNanos);
|
||||
@@ -112,7 +112,7 @@
|
||||
this.startMeasuringTaskExecutionTime();
|
||||
this.waitUntilNextTick();
|
||||
this.finishMeasuringTaskExecutionTime();
|
||||
@@ -1690,7 +_,7 @@
|
||||
@@ -1691,7 +_,7 @@
|
||||
long worldTime = level.getGameTime();
|
||||
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
|
||||
for (Player entityhuman : level.players()) {
|
||||
@@ -121,7 +121,7 @@
|
||||
continue;
|
||||
}
|
||||
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
|
||||
@@ -1855,7 +_,7 @@
|
||||
@@ -1856,7 +_,7 @@
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
// Paper start - optimise collisions
|
||||
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
|
||||
if (this.touchingUnloadedChunk()) {
|
||||
@@ -5112,7 +_,7 @@
|
||||
@@ -5117,7 +_,7 @@
|
||||
}
|
||||
|
||||
public float maxUpStep() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -253,4 +_,32 @@
|
||||
@@ -238,4 +_,32 @@
|
||||
return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid();
|
||||
}
|
||||
// Paper end - Option to prevent TNT from moving in water
|
||||
|
||||
@@ -8,12 +8,3 @@
|
||||
// CraftBukkit start
|
||||
public boolean checkReachable = true;
|
||||
public abstract org.bukkit.inventory.InventoryView getBukkitView();
|
||||
@@ -552,7 +_,7 @@
|
||||
|
||||
slot.setChanged();
|
||||
// CraftBukkit start - Make sure the client has the right slot contents
|
||||
- if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != 64) {
|
||||
+ if (player instanceof ServerPlayer serverPlayer && slot.getMaxStackSize() != net.minecraft.world.Container.MAX_STACK) { // Purpur - PaperPR#12654
|
||||
serverPlayer.connection.send(new net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
|
||||
// Updating a crafting inventory makes the client reset the result slot, have to send it again
|
||||
if (this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.WORKBENCH || this.getBukkitView().getType() == org.bukkit.event.inventory.InventoryType.CRAFTING) {
|
||||
|
||||
@@ -1,24 +1,6 @@
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -316,7 +_,7 @@
|
||||
) {
|
||||
this.level = level;
|
||||
this.source = source;
|
||||
- this.radius = (float) Math.max(radius, 0.0); // CraftBukkit - clamp bad values
|
||||
+ this.radius = (float) (level == null || level.purpurConfig.explosionClampRadius ? Math.max(radius, 0.0) : radius); // CraftBukkit - clamp bad values // Purpur - Config to remove explosion radius clamp
|
||||
this.center = center;
|
||||
this.fire = fire;
|
||||
this.blockInteraction = blockInteraction;
|
||||
@@ -638,7 +_,7 @@
|
||||
|
||||
public void explode() {
|
||||
// CraftBukkit start
|
||||
- if (this.radius < 0.1F) {
|
||||
+ if ((this.level == null || this.level.purpurConfig.explosionClampRadius) && this.radius < 0.1F) { // Purpur - Config to remove explosion radius clamp
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -650,6 +_,23 @@
|
||||
@@ -648,6 +_,23 @@
|
||||
this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH];
|
||||
this.mutablePos = new BlockPos.MutableBlockPos();
|
||||
// Paper end - collision optimisations
|
||||
|
||||
Reference in New Issue
Block a user