Skip to content

Commit 1deca2a

Browse files
committed
Update to 26.3-pre-2
1 parent 83b7a83 commit 1deca2a

21 files changed

Lines changed: 499 additions & 234 deletions

‎gradle.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=io.papermc.paper
2-
mcVersion=26.3-pre-1
2+
mcVersion=26.3-pre-2
33
# This is the current API version for use in (paper-)plugin.yml files
44
# During snapshot cycles this should be the anticipated version of the release target
55
apiVersion=26.3

‎paper-server/build.gradle.kts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
1515

1616
dependencies {
17-
mache("io.papermc:mache:26.3-pre-1+build.1")
17+
mache("io.papermc:mache:26.3-pre-2+build.2")
1818
paperclip("io.papermc:paperclip:3.0.4")
1919
}
2020

‎paper-server/patches/sources/net/minecraft/core/registries/BuiltInRegistries.java.patch‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--- a/net/minecraft/core/registries/BuiltInRegistries.java
22
+++ b/net/minecraft/core/registries/BuiltInRegistries.java
3-
@@ -372,6 +_,11 @@
4-
public static final Registry<MapCodec<? extends SlotSource>> SLOT_SOURCE_TYPE = registerSimple(Registries.SLOT_SOURCE_TYPE, SlotSources::bootstrap);
3+
@@ -367,6 +_,11 @@
4+
public static final Registry<ContextKeySet> CONTEXT_KEY_SET = registerSimple(Registries.CONTEXT_KEY_SET, LootContextParamSets::bootstrap);
55
public static final Registry<Consumer<GameTestHelper>> TEST_FUNCTION = registerSimple(Registries.TEST_FUNCTION, BuiltinTestFunctions::bootstrap);
66
public static final Registry<? extends Registry<?>> REGISTRY = WRITABLE_REGISTRY;
77
+ // Paper start - add built-in registry conversions
@@ -12,15 +12,15 @@
1212

1313
private static <T> Registry<T> registerSimple(final ResourceKey<? extends Registry<T>> name, final BuiltInRegistries.RegistryBootstrap<T> loader) {
1414
return internalRegister(name, new MappedRegistry<>(name, Lifecycle.stable(), false), loader);
15-
@@ -399,6 +_,7 @@
15+
@@ -394,6 +_,7 @@
1616
final ResourceKey<? extends Registry<T>> name, final R registry, final BuiltInRegistries.RegistryBootstrap<T> loader
1717
) {
1818
Bootstrap.checkBootstrapCalled(() -> "registry " + name.identifier());
1919
+ io.papermc.paper.registry.PaperRegistryAccess.instance().registerRegistry(registry); // Paper - initialize API registry
2020
Identifier key = name.identifier();
2121
LOADERS.put(key, () -> loader.run(registry));
2222
WRITABLE_REGISTRY.register((ResourceKey)name, registry, RegistrationInfo.BUILT_IN);
23-
@@ -406,16 +_,34 @@
23+
@@ -401,16 +_,34 @@
2424
}
2525

2626
public static void bootStrap() {
@@ -55,7 +55,7 @@
5555
});
5656
}
5757

58-
@@ -424,6 +_,7 @@
58+
@@ -419,6 +_,7 @@
5959

6060
for (Registry<?> registry : REGISTRY) {
6161
bindBootstrappedTagsToEmpty(registry);

‎paper-server/patches/sources/net/minecraft/server/Bootstrap.java.patch‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
--- a/net/minecraft/server/Bootstrap.java
22
+++ b/net/minecraft/server/Bootstrap.java
3-
@@ -43,6 +_,7 @@
3+
@@ -44,6 +_,7 @@
44
if (!isBootstrapped) {
55
isBootstrapped = true;
66
Instant start = Instant.now();
77
+ io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enterBootstrappers(); // Paper - Entrypoint for bootstrapping
88
if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) {
99
throw new IllegalStateException("Unable to load registries");
1010
}
11-
@@ -55,10 +_,80 @@
11+
@@ -56,11 +_,81 @@
1212
EntitySelectorOptions.bootStrap();
1313
DispenseItemBehavior.bootStrap();
1414
CauldronInteractions.bootStrap();
1515
- BuiltInRegistries.bootStrap();
1616
+ BuiltInRegistries.bootStrap(io.papermc.paper.world.worldgen.OptionallyFlatBedrockCondition::bootstrap); // Paper - Flat bedrock generator settings
1717
CreativeModeTabs.validate();
18+
LootContextParamSets.validate();
1819
wrapStreams();
1920
bootstrapDuration.set(Duration.between(start, Instant.now()).toMillis());
2021
+ // CraftBukkit start

‎paper-server/patches/sources/net/minecraft/server/level/ServerChunkCache.java.patch‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--- a/net/minecraft/server/level/ServerChunkCache.java
22
+++ b/net/minecraft/server/level/ServerChunkCache.java
3-
@@ -66,6 +_,7 @@
3+
@@ -65,6 +_,7 @@
4+
private final SavedDataStorage savedDataStorage;
45
private final TicketStorage ticketStorage;
5-
private long lastInhabitedUpdate;
66
public boolean spawnEnemies = true;
77
+ public boolean spawnFriendlies = true; // Paper - add back spawnFriendlies field
88
private static final int CACHE_SIZE = 4;
99
private final long[] lastChunkPos = new long[4];
1010
private final @Nullable ChunkStatus[] lastChunkStatus = new ChunkStatus[4];
11-
@@ -74,6 +_,13 @@
11+
@@ -73,6 +_,13 @@
1212
private final Set<ChunkHolder> chunkHoldersToBroadcast = new ReferenceOpenHashSet<>();
1313
@VisibleForDebug
1414
private NaturalSpawner.@Nullable SpawnState lastSpawnState;
@@ -22,15 +22,15 @@
2222

2323
public ServerChunkCache(
2424
final ServerLevel level,
25-
@@ -86,6 +_,7 @@
25+
@@ -85,6 +_,7 @@
2626
final int simulationDistance,
2727
final boolean syncWrites,
2828
final ChunkStatusUpdateListener chunkStatusListener
2929
+ , final SavedDataStorage savedDataStorage // Paper - initialize SavedDataStorage earlier
3030
) {
3131
this.level = level;
3232
this.mainThreadProcessor = new ServerChunkCache.MainThreadExecutor(level);
33-
@@ -98,7 +_,7 @@
33+
@@ -97,7 +_,7 @@
3434
LOGGER.error("Failed to create dimension data storage directory", e);
3535
}
3636

@@ -39,7 +39,7 @@
3939
this.ticketStorage = this.savedDataStorage.computeIfAbsent(TicketStorage.TYPE);
4040
this.chunkMap = new ChunkMap(
4141
level,
42-
@@ -120,6 +_,64 @@
42+
@@ -119,6 +_,64 @@
4343
this.clearCache();
4444
}
4545

@@ -104,7 +104,7 @@
104104
@Override
105105
public ThreadedLevelLightEngine getLightEngine() {
106106
return this.lightEngine;
107-
@@ -154,7 +_,7 @@
107+
@@ -153,7 +_,7 @@
108108
for (int i = 0; i < 4; i++) {
109109
if (pos == this.lastChunkPos[i] && targetStatus == this.lastChunkStatus[i]) {
110110
ChunkAccess chunkAccess = this.lastChunk[i];
@@ -113,7 +113,7 @@
113113
return chunkAccess;
114114
}
115115
}
116-
@@ -233,7 +_,15 @@
116+
@@ -232,7 +_,15 @@
117117
long key = pos.pack();
118118
int targetTicketLevel = ChunkLevel.byStatus(targetStatus);
119119
ChunkHolder chunkHolder = this.getVisibleChunkIfPresent(key);
@@ -130,7 +130,7 @@
130130
this.addTicket(new Ticket(TicketType.UNKNOWN, targetTicketLevel), pos);
131131
if (this.chunkAbsent(chunkHolder, targetTicketLevel)) {
132132
ProfilerFiller profiler = Profiler.get();
133-
@@ -253,7 +_,7 @@
133+
@@ -252,7 +_,7 @@
134134
}
135135

136136
private boolean chunkAbsent(final @Nullable ChunkHolder chunkHolder, final int targetTicketLevel) {
@@ -139,7 +139,7 @@
139139
}
140140

141141
@Override
142-
@@ -307,17 +_,39 @@
142+
@@ -306,17 +_,39 @@
143143

144144
@Override
145145
public void close() throws IOException {
@@ -181,16 +181,16 @@
181181
this.ticketStorage.purgeStaleTickets(this.chunkMap);
182182
}
183183

184-
@@ -341,7 +_,7 @@
184+
@@ -337,7 +_,7 @@
185185
if (!this.level.isDebug()) {
186186
ProfilerFiller profiler = Profiler.get();
187187
profiler.push("pollingChunks");
188188
- if (this.level.tickRateManager().runsNormally()) {
189189
+ if (this.level.tickRateManager().runsNormally() && this.level.paperConfig().unsupportedSettings.ticking.chunks) { // Paper - option to disable ticking
190190
profiler.push("tickingChunks");
191-
this.tickChunks(profiler, timeDiff);
191+
this.tickChunks(profiler);
192192
profiler.pop();
193-
@@ -371,12 +_,20 @@
193+
@@ -367,12 +_,20 @@
194194
int chunkCount = this.distanceManager.getNaturalSpawnChunkCount();
195195
NaturalSpawner.SpawnState spawnCookie = NaturalSpawner.createState(chunkCount, this.level, this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
196196
this.lastSpawnState = spawnCookie;
@@ -215,7 +215,7 @@
215215
} else {
216216
spawningCategories = List.of();
217217
}
218-
@@ -563,7 +_,13 @@
218+
@@ -557,7 +_,13 @@
219219

220220
@Override
221221
public void setSpawnSettings(final boolean spawnEnemies) {
@@ -229,7 +229,7 @@
229229
}
230230

231231
public String getChunkDebugData(final ChunkPos pos) {
232-
@@ -630,12 +_,18 @@
232+
@@ -624,12 +_,18 @@
233233

234234
@Override
235235
protected boolean pollTask() {

0 commit comments

Comments
 (0)