Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@e86a1b6: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@a6df4c8: Handle corrupt light data gracefully
PaperMC/Paper@ce0a041: [ci skip] Rebuild patches

[Paper Changes]
PaperMC/Paper@c6aa61e: Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561)
PaperMC/Paper@93b435d: [ci skip] better instructions for patch apply conflict (#11568)
PaperMC/Paper@42a1901: Correctly adopt upstream item EAR fix (#11582)
PaperMC/Paper@fcb6c72: Correctly pass velocity native compressor (#11509)
PaperMC/Paper@99f4bb2: Fix infinite fireworks (#11592) (#11594)
  • Loading branch information
AlphaKR93 committed Nov 8, 2024
1 parent c0d36db commit 8062ccb
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 133 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish
pufferfishBranch = ver/1.21
usePufferfish = false

paperCommit = ce0a0419476d1072ca739a0e8f22d8a358c1c1a2
paperCommit = 99f4bb29ba77964304a37e51b7f1824a4a6032af
purpurCommit = c6802b0a27f1f8faac4ad30f902810fd0ed8051e
120 changes: 60 additions & 60 deletions patches/server/0001-Purpur-Server-Changes.patch

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions patches/server/0016-Apply-various-optimizations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations
Akarin - Swaps the predicate order of collision

diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6b32cd1391f39b6fe61c3c8c00249d1d4278cbd0..b94f3e2071e71b2b038e875b25c985b0c7c00fc0 100644
index d6d9dd17750d7028e13aad539e7b65a7561d9f4b..ae264484f99227f5535c428ebda4860fc8abcc72 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2341,8 +2341,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2342,8 +2342,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void playerTouch(Player player) {}

public void push(Entity entity) {
Expand All @@ -21,7 +21,7 @@ index 6b32cd1391f39b6fe61c3c8c00249d1d4278cbd0..b94f3e2071e71b2b038e875b25c985b0
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
double d0 = entity.getX() - this.getX();
double d1 = entity.getZ() - this.getZ();
@@ -2370,8 +2371,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2371,8 +2372,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.push(d0, 0.0D, d1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0021-Variable-entity-wakeup-duration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ index 33bcfec86f83ce6e0ec17436ad38da8aeced48be..b047af738236be3400d07d46c663017e

public Block block;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 813b8aeb7bf39e03346fd9ca63c4c6498e162965..9843f440d921a61c60df5ec5e6e7ffebc9444b71 100644
index e047c0a4a8638588b4ac0d47c4c96899fac4abb7..14e62940aec1fe4c70b128f2811df6c09c701718 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -61,29 +61,37 @@ public class ActivationRange
@@ -62,29 +62,37 @@ public class ActivationRange
net.minecraft.world.entity.schedule.Activity.PANIC
};

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0025-Improve-SwingTime-ticking.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Improve SwingTime ticking


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 18648eed57dca05d89692064dcf4aa3172cd5914..bf5633f387e268191e2a33be2dcec6c514c0766f 100644
index d3d4e7e01afeb4ace5e487f9ef0926fd987c8ca4..6f999fcba6f72f2d31835c4ce5f6c17a69b0537c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2771,6 +2771,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2772,6 +2772,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}

protected void updateSwingTime() {
Expand Down
59 changes: 30 additions & 29 deletions patches/server/0041-Completely-remove-Mojang-Profiler.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..467e17bfce31d0919d603698c9d88a04
public int forkLimit() {
return this.forkLimit;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f5623f844f17 100644
index b62be89b9b3705a29b6c42a794d653c66b73f7eb..0cd6da6f5d37113ea642b2a7f6e9807c7e46ae2c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -111,19 +111,19 @@ import net.minecraft.util.datafix.DataFixers;
Expand Down Expand Up @@ -108,26 +108,27 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
import net.minecraft.util.thread.ReentrantBlockableEventLoop;
import net.minecraft.world.Difficulty;
import net.minecraft.world.RandomSequences;
@@ -229,12 +229,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public LevelStorageSource.LevelStorageAccess storageSource;
@@ -230,12 +230,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final PlayerDataStorage playerDataStorage;
private final List<Runnable> tickables = Lists.newArrayList();
- private MetricsRecorder metricsRecorder;
private MetricsRecorder metricsRecorder;
- private Consumer<ProfileResults> onMetricsRecordingStopped;
- private Consumer<Path> onMetricsRecordingFinished;
- private boolean willStartRecordingMetrics;
- @Nullable
- private MinecraftServer.TimeProfiler debugCommandProfiler;
- private boolean debugCommandProfilerDelayStart;
+ //private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang's Profiler
+ //private Consumer<ProfileResults> onMetricsRecordingStopped; // Plazma - Completely remove Mojang's Profiler
+ //private Consumer<Path> onMetricsRecordingFinished; // Plazma - Completely remove Mojang's Profiler
+ //private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang's Profiler
+ //@Nullable // Plazma - Completely remove Mojang's Profiler
+ //private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang's Profiler
private boolean debugCommandProfilerDelayStart;
+ //private boolean debugCommandProfilerDelayStart;
private ServerConnectionListener connection;
public final ChunkProgressListenerFactory progressListenerFactory;
@@ -1409,7 +1409,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Nullable
@@ -1409,7 +1410,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profiler_a.close();
}*/ // Purpur
} finally {
Expand All @@ -136,7 +137,7 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
}

this.isReady = true;
@@ -1715,12 +1715,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1715,12 +1716,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

--this.ticksUntilAutosave;
// Paper start - Incremental chunk and player saving
Expand All @@ -151,7 +152,7 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
try {
this.isSaving = true;
@@ -1735,7 +1735,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1735,7 +1736,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally {
this.isSaving = false;
}
Expand All @@ -160,7 +161,7 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
// Paper end - Incremental chunk and player saving

//ProfilerFiller gameprofilerfiller = Profiler.get(); // Purpur
@@ -1768,11 +1768,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1768,11 +1769,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private void autoSave() {
this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
MinecraftServer.LOGGER.debug("Autosave started");
Expand All @@ -175,7 +176,7 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
MinecraftServer.LOGGER.debug("Autosave finished");
}

@@ -1841,7 +1841,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1841,7 +1842,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

protected void tickChildren(BooleanSupplier shouldKeepTicking) {
Expand All @@ -184,15 +185,15 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562

this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
@@ -2932,6 +2932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2932,6 +2933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end

+ /* // Plazma - Completely remove Mojang's Profiler
private ProfilerFiller createProfiler() {
if (false && this.willStartRecordingMetrics) { // Purpur
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
@@ -2957,12 +2958,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2957,12 +2959,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

public void startRecordingMetrics(Consumer<ProfileResults> resultConsumer, Consumer<Path> dumpConsumer) {
Expand All @@ -207,39 +208,39 @@ index 056c84c13020d6229f27b4123de494dc28a31e65..b9e78222ca77f1a1ab1fd5191a14f562
}

public void stopRecordingMetrics() {
@@ -2976,6 +2977,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2976,6 +2978,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void cancelRecordingMetrics() {
//this.metricsRecorder.cancel(); // Purpur
}
+ */
+ */ // Plazma - Completely remove Mojang's Profiler

public Path getWorldPath(LevelResource worldSavePath) {
return this.storageSource.getLevelPath(worldSavePath);
@@ -3026,6 +3028,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3026,6 +3029,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.isSaving;
}

+ /* // Plazma - Completely remove Mojang's Profiler
public boolean isTimeProfilerRunning() {
return false; //this.debugCommandProfilerDelayStart || this.debugCommandProfiler != null; // Purpur
}
@@ -3044,6 +3047,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3044,6 +3048,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return methodprofilerresults;
}
}
+ */ // Plazma - Completely remove Mojang's Profiler

public int getMaxChainedNeighborUpdates() {
return 1000000;
@@ -3157,6 +3161,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3157,6 +3162,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}

+ /* // Plazma - Completely remove Mojang's Profiler
+ /*
private static class TimeProfiler {

final long startNanos;
@@ -3206,6 +3211,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -3206,6 +3212,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
Expand Down Expand Up @@ -805,7 +806,7 @@ index c67846e4d5583d79c6e9760c10d2581f0d54f45c..61f704fc25c45367185633708852ee4b

@Override
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8c724698d57caf5ca65b8cb0bb21d12250258743..a27d7545c36a32378084646b750ad91a3c954c29 100644
index ae264484f99227f5535c428ebda4860fc8abcc72..07b4f09fcc47bdb3fe96b759ff42d6179bf71060 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -84,8 +84,8 @@ import net.minecraft.tags.FluidTags;
Expand All @@ -819,7 +820,7 @@ index 8c724698d57caf5ca65b8cb0bb21d12250258743..a27d7545c36a32378084646b750ad91a
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.Nameable;
@@ -4060,16 +4060,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4061,16 +4061,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.teleport(this.calculatePassengerTransition(teleportTarget, entity));
}

Expand All @@ -840,7 +841,7 @@ index 8c724698d57caf5ca65b8cb0bb21d12250258743..a27d7545c36a32378084646b750ad91a
}

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d4f6c8732f4e304c690999c0cbd7636a90162504..5144a761577c2a2448aaaa35cf41328a53659a50 100644
index e1e4ebb3cf5903c59c82d9d270fe03c747c57e26..6ba2e04325b3da59801563f66a557ec217495a23 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -73,8 +73,8 @@ import net.minecraft.tags.FluidTags;
Expand Down Expand Up @@ -1178,19 +1179,19 @@ index b4ffad429ace965f16ebf47119c880b709b27f2e..50bed3677f7e38d19ceda0dff0c49995
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.InteractionHand;
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 26814c13559d82e44546f8b2834a90cc58941a49..22ecef07399ab9d9bde3cd9a3024d070f129c6bd 100644
index d376d89b479a4d5cc9ac568d23c7603a9355d580..b9ecf38cec076b8d41684919c06feea6f9a9950f 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -29,7 +29,7 @@ import net.minecraft.server.level.ServerLevel;
@@ -41,7 +41,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
import net.minecraft.server.packs.resources.SimplePreparableReloadListener;
-import net.minecraft.util.profiling.ProfilerFiller;
+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.crafting.display.RecipeDisplay;
@@ -93,7 +93,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp

public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> implements RecipeAccess {

@@ -94,7 +94,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
}

@Override
Expand All @@ -1199,7 +1200,7 @@ index 26814c13559d82e44546f8b2834a90cc58941a49..22ecef07399ab9d9bde3cd9a3024d070
SortedMap<ResourceLocation, Recipe<?>> sortedmap = new TreeMap();

SimpleJsonResourceReloadListener.scanDirectory(manager, Registries.elementsDirPath(Registries.RECIPE), this.registries.createSerializationContext(JsonOps.INSTANCE), Recipe.CODEC, sortedmap);
@@ -108,7 +108,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
@@ -109,7 +109,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp
return RecipeMap.create(list);
}

Expand Down
Loading

0 comments on commit 8062ccb

Please sign in to comment.