Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@7b66699b 26.2-rc-2
PaperMC/Paper@bb676e22 actual 26.2-rc-2
PaperMC/Paper@a737972b Fix isAllowedInPeaceful call
PaperMC/Paper@c35810c3 Update deps to match Vanilla
PaperMC/Paper@e5643cd4 Update Vex#getSummoner return type
PaperMC/Paper@e00936a3 [ci/skip] update log4j for the api
PaperMC/Paper@eb5df78f fix wither spawning parity and remove openSign var
PaperMC/Paper@d1aca9a6 Apply most remaining feature patches
This commit is contained in:
granny
2026-06-12 17:35:54 -07:00
parent 779f1f2613
commit 0c913568e6
42 changed files with 274 additions and 287 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/EntityGetter.java
+++ b/net/minecraft/world/level/EntityGetter.java
@@ -142,7 +_,7 @@
@@ -183,7 +_,7 @@
default boolean hasNearbyAlivePlayer(final double x, final double y, final double z, final double range) {
for (Player player : this.players()) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -171,10 +_,54 @@
@@ -172,10 +_,54 @@
}
// Paper end - add paper world config
@@ -55,7 +55,7 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -220,6 +_,8 @@
@@ -853,6 +_,8 @@
final org.bukkit.NamespacedKey worldKey = CraftNamespacedKey.fromMinecraft(dimension.identifier()); // Paper
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, worldKey); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -64,8 +64,8 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, worldKey, biomeProvider, environment);
@@ -1505,4 +_,14 @@
return ret;
@@ -2203,4 +_,14 @@
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
}
// Paper end - allow patching this logic
+

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/NaturalSpawner.java
+++ b/net/minecraft/world/level/NaturalSpawner.java
@@ -213,7 +_,7 @@
@@ -286,7 +_,7 @@
pos.set(x, yStart, z);
double xx = x + 0.5;
double zz = z + 0.5;

View File

@@ -1,9 +1,9 @@
--- a/net/minecraft/world/level/ServerExplosion.java
+++ b/net/minecraft/world/level/ServerExplosion.java
@@ -341,6 +_,23 @@
}
public int explode() {
@@ -631,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
+ // Purpur start - add PreExplodeEvents
+ if (this.source != null) {
+ org.bukkit.Location location = new org.bukkit.Location(this.level.getWorld(), this.center.x, this.center.y, this.center.z);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/WitherSkullBlock.java
+++ b/net/minecraft/world/level/block/WitherSkullBlock.java
@@ -69,6 +_,7 @@
@@ -68,6 +_,7 @@
);
witherBoss.yBodyRot = match.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F;
witherBoss.makeInvulnerable();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -106,6 +_,10 @@
@@ -107,6 +_,10 @@
input.read("PublicBukkitValues", CompoundTag.CODEC)
.ifPresent(this.persistentDataContainer::putAll);
// Paper end - read persistent data container
@@ -11,7 +11,7 @@
}
public final void loadWithComponents(final ValueInput input) {
@@ -123,6 +_,11 @@
@@ -124,6 +_,11 @@
output.store("PublicBukkitValues", CompoundTag.CODEC, this.persistentDataContainer.toTagCompound());
}
// CraftBukkit end
@@ -23,7 +23,7 @@
}
public final CompoundTag saveWithFullMetadata(final HolderLookup.Provider registries) {
@@ -388,4 +_,16 @@
@@ -390,4 +_,16 @@
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
}
}

View File

@@ -2,9 +2,9 @@
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -94,6 +_,7 @@
ListTag entities = new ListTag();
final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
chunk.getEntities().forEach(e -> {
TagValueOutput output = TagValueOutput.createWithContext(reporter.forChild(e.problemPath()), e.registryAccess());
+ if (!e.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity
if (e.save(output)) {
CompoundTag result = output.buildResult();
entities.add(result);
// Paper start - Entity load/save limit per chunk
final EntityType<?> entityType = e.getType();
final int saveLimit = this.level.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -309,7 +_,7 @@
// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {
- LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4);
+ LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - DO NOT REPORT THIS TO PURPUR - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4); // Purpur - Rebrand
}
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/material/FlowingFluid.java
+++ b/net/minecraft/world/level/material/FlowingFluid.java
@@ -192,7 +_,7 @@
@@ -234,7 +_,7 @@
}
}
@@ -9,7 +9,7 @@
BlockState belowState = level.getBlockState(mutablePos.setWithOffset(pos, Direction.DOWN));
FluidState belowFluid = belowState.getFluidState();
if (belowState.isSolid() || this.isSourceBlockOfThisType(belowFluid)) {
@@ -280,6 +_,12 @@
@@ -320,6 +_,12 @@
}
protected abstract boolean canConvertToSource(ServerLevel level);