Skip to content

Commit 71bc064

Browse files
committed
Update upstream
1 parent 122605f commit 71bc064

4 files changed

Lines changed: 23 additions & 14 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=1.21.11-R0.1-SNAPSHOT
33
mcVersion=1.21.11
44
apiVersion=1.21.11
55

6-
purpurRef=f6242c0a304bee6b87df1bdc62e18d6a38ed3452
6+
purpurRef=a91710642835466d3b07c1ab87bbdc8a75fd5a18
77

88
org.gradle.configuration-cache=true
99
org.gradle.caching=true

shreddedpaper-server/minecraft-patches/sources/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java.patch

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
if (!TickThread.isTickThread()) {
161161
// These will be handled on the next ServerChunkCache$MainThreadExecutor#pollTask, as it runs the distance manager update
162162
// which will invoke processTicketUpdates
163-
@@ -1143,94 +_,110 @@
163+
@@ -1143,97 +_,116 @@
164164

165165
private void removeChunkHolder(final NewChunkHolder holder) {
166166
holder.onUnload();
@@ -230,8 +230,17 @@
230230
// We do need to process updates here so that any addTicket that is synchronised before this call does not go missed.
231231
this.processTicketUpdates();
232232

233-
- final int toUnloadCount = Math.max(50, (int)(unloadCountTentative * 0.05));
234-
+ final int toUnloadCount = 50; // Math.max(50, (int)(unloadCountTentative * 0.05)); // ShreddedPaper - use our own unload queue
233+
- final int toUnloadCount = Math.max(
234+
- PlatformHooks.get().configMinChunkUnloadCount(this.world),
235+
- (int)Math.round(unloadCountTentative * Math.clamp(PlatformHooks.get().configMinChunkUnloadFraction(this.world), 0.0, 1.0))
236+
- );
237+
+ // ShreddedPaper start - use our own unload queue
238+
+ // final int toUnloadCount = Math.max(
239+
+ // PlatformHooks.get().configMinChunkUnloadCount(this.world),
240+
+ // (int)Math.round(unloadCountTentative * Math.clamp(PlatformHooks.get().configMinChunkUnloadFraction(this.world), 0.0, 1.0))
241+
+ // );
242+
+ final int toUnloadCount = 50;
243+
+ // ShreddedPaper end - use our own unload queue
235244
int processedCount = 0;
236245

237246
- for (final ChunkUnloadQueue.SectionToUnload sectionRef : unloadSectionsForRegion) {
@@ -334,7 +343,7 @@
334343

335344
// run stage 1
336345
for (int i = 0, len = stage1.size(); i < len; ++i) {
337-
@@ -1295,10 +_,12 @@
346+
@@ -1298,10 +_,12 @@
338347

339348
processedCount += stage1.size();
340349

@@ -351,7 +360,7 @@
351360
}
352361

353362
public enum TicketOperationType {
354-
@@ -1515,7 +_,7 @@
363+
@@ -1518,7 +_,7 @@
355364
public JsonObject getDebugJson() {
356365
final JsonObject ret = new JsonObject();
357366

shreddedpaper-server/minecraft-patches/sources/net/minecraft/CrashReport.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO SHREDDEDPAPER INSTEAD!", ""); // Purpur - Rebrand // ShreddedPaper
99

1010
public CrashReport(String title, Throwable exception) {
11-
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper
11+
this.title = title;

shreddedpaper-server/minecraft-patches/sources/net/minecraft/server/MinecraftServer.java.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
}
8585

8686
this.waitUntilNextTick();
87-
@@ -1627,7 +_,9 @@
87+
@@ -1622,7 +_,9 @@
8888
this.autoSave();
8989
}
9090

@@ -94,7 +94,7 @@
9494
// Paper start - avoid issues with certain tasks not processing during sleep
9595
Runnable task;
9696
while ((task = this.processQueue.poll()) != null) {
97-
@@ -1635,7 +_,7 @@
97+
@@ -1630,7 +_,7 @@
9898
}
9999
for (final ServerLevel level : this.levels.values()) {
100100
// process unloads
@@ -103,7 +103,7 @@
103103
}
104104
// Paper end - avoid issues with certain tasks not processing during sleep
105105
this.server.spark.executeMainThreadTasks(); // Paper - spark
106-
@@ -1794,16 +_,20 @@
106+
@@ -1789,16 +_,20 @@
107107
protected void tickChildren(BooleanSupplier hasTimeLeft) {
108108
ProfilerFiller profilerFiller = Profiler.get();
109109
this.getPlayerList().getPlayers().forEach(serverPlayer1 -> serverPlayer1.connection.suspendFlushing());
@@ -132,7 +132,7 @@
132132
// Paper end - optimise Folia entity scheduler
133133
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.ADVENTURE_CLICK_MANAGER.handleQueue(this.tickCount); // Paper
134134
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.DIALOG_CLICK_MANAGER.handleQueue(this.tickCount); // Paper
135-
@@ -1839,7 +_,23 @@
135+
@@ -1834,7 +_,23 @@
136136
}
137137
}
138138

@@ -156,7 +156,7 @@
156156
for (ServerLevel serverLevel : this.getAllLevels()) {
157157
serverLevel.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
158158
serverLevel.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
159-
@@ -1858,7 +_,9 @@
159+
@@ -1853,7 +_,9 @@
160160
profilerFiller.push("tick");
161161

162162
try {
@@ -167,7 +167,7 @@
167167
} catch (Throwable var7) {
168168
CrashReport crashReport = CrashReport.forThrowable(var7, "Exception ticking world");
169169
serverLevel.fillReportDetails(crashReport);
170-
@@ -1867,12 +_,20 @@
170+
@@ -1862,12 +_,20 @@
171171

172172
profilerFiller.pop();
173173
profilerFiller.pop();
@@ -191,7 +191,7 @@
191191
profilerFiller.popPush("players");
192192
this.playerList.tick();
193193
profilerFiller.popPush("debugSubscribers");
194-
@@ -1892,6 +_,7 @@
194+
@@ -1887,6 +_,7 @@
195195

196196
for (ServerPlayer serverPlayer : this.playerList.getPlayers()) {
197197
serverPlayer.connection.chunkSender.sendNextChunks(serverPlayer);

0 commit comments

Comments
 (0)