Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e4a5a894 Update to Minecraft 26.1.1
PaperMC/Paper@92a4d8db Update "Only write chunk data to disk if it serializes without throwing"
PaperMC/Paper@02d9cbce Update "Entity load/save limit per chunk"
PaperMC/Paper@cb696286 Update "Attempt to recalculate regionfile header if it is corrupt"
PaperMC/Paper@4662bab9 Update "Incremental chunk and player saving"
PaperMC/Paper@4dddc82f Implement new version schema: `<mcver>.build.<paper_build_no>-<paper_status>` / `<mcver>.local-SNAPSHOT`
PaperMC/Paper@fc0a9980 Set channel to ALPHA
PaperMC/Paper@a4fa0357 update gradle wrapper
PaperMC/Paper@a15ceb7a Update fill-gradle to 1.0.11
PaperMC/Paper@52f7e24e Publish to releases repository
PaperMC/Paper@bb7ff8f0 Update "Optimise general POI access"
PaperMC/Paper@ac42a07e Update "Flush regionfiles on save configuration option"
PaperMC/Paper@14357cc5 Avoid using the regionfile directory name to determine if it is chunk data
PaperMC/Paper@a2f4d349 Update "Optimise collision checking in player move packet handling"
PaperMC/Paper@50303a0e Update "Add explicit flush support to Log4j AsyncAppender"
PaperMC/Paper@7bc4f895 Shift unapplied patches
PaperMC/Paper@62ba2c4f Update "Improve keepalive ping system"
PaperMC/Paper@f6d27019 Update "Optimise EntityScheduler ticking"
PaperMC/Paper@4d8d06c7 Fix WorldBorder#setCenter ignoring new values on 26.1.1 (#13741)
PaperMC/Paper@f9da8035 update unpick definitions
PaperMC/Paper@fc71a133 [ci/skip] fixup previous commit
PaperMC/Paper@4c91cd34 Lazy set Entity.projectileSource in AbstractProjectile#getShooter
PaperMC/Paper@3d1da60c Cache the climbing check in activation range (#12764)
PaperMC/Paper@575630f3 feat: Optimize ServerWaypointManager when locator bar is disabled
PaperMC/Paper@742daf02 [ci/skip] fixup previous commit
PaperMC/Paper@d29063da Rebuild patches
PaperMC/Paper@ce581c3c Bump deps to match Vanilla versions (#13744)
PaperMC/Paper@f3e9a934 Fix attack check
PaperMC/Paper@b4743b58 Fix gamerule loading in Management Protocol (#13753)
PaperMC/Paper@c53ac8a1 Add PlayerToggleEntityAgeLockEvent (#13742)
PaperMC/Paper@59081719 fixup previous event
PaperMC/Paper@7b49b586 Update "Optional per player mob spawns"
PaperMC/Paper@1fae14c2 Update "Improve cancelling PreCreatureSpawnEvent with per player mob spawns"
PaperMC/Paper@c40cb75b Update "Optimize Hoppers"
PaperMC/Paper@edad1e4c Update "Anti-Xray"
PaperMC/Paper@106a934d [ci/skip] Drop stale TODO
PaperMC/Paper@77c0866f handle legacy uid in vanilla migration and always write metadata during migration
This commit is contained in:
granny
2026-04-07 17:41:32 -07:00
parent 3e5ff62f29
commit d53e7784d6
38 changed files with 254 additions and 301 deletions

View File

@@ -1,11 +1,11 @@
--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
@@ -89,7 +_,7 @@
}
@@ -90,7 +_,7 @@
};
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = poiManager.findAllClosestFirstWithType(
- poiType, cacheTest, body.blockPosition(), 48, PoiManager.Occupancy.HAS_SPACE
+ poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE // Purpur - Configurable villager search radius
)
.limit(5L)
.filter(px -> validPoi.test(level, (BlockPos)px.getSecond()))
// Paper start - optimise POI searches
java.util.List<Pair<Holder<PoiType>, BlockPos>> poiPositionsRaw = new java.util.ArrayList<>();
- ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), SCAN_RANGE, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw);
+ ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw); // Purpur - Configurable villager search radius
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = new java.util.HashSet<>(poiPositionsRaw.size());
for (Pair<Holder<PoiType>, BlockPos> pair : poiPositionsRaw) {
if (validPoi.test(level, pair.getSecond())) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java
+++ b/net/minecraft/world/entity/ai/behavior/TransportItemsBetweenContainers.java
@@ -286,7 +_,7 @@
@@ -287,7 +_,7 @@
LevelChunk levelChunk = level.getChunkSource().getChunkNow(chunkPos.x(), chunkPos.z());
if (levelChunk != null) {
for (BlockEntity potentialTarget : levelChunk.getBlockEntities().values()) {
@@ -9,7 +9,7 @@
double distance = chestBlockEntity.getBlockPos().distToCenterSqr(body.position());
if (distance < closestDistance) {
TransportItemsBetweenContainers.TransportItemTarget targetValidToPick = this.isTargetValidToPick(
@@ -375,7 +_,11 @@
@@ -376,7 +_,11 @@
}
private boolean isTargetBlocked(final Level level, final TransportItemsBetweenContainers.TransportItemTarget target) {
@@ -22,7 +22,7 @@
}
private boolean targetHasNotChanged(final Level level, final TransportItemsBetweenContainers.TransportItemTarget target) {
@@ -455,7 +_,7 @@
@@ -456,7 +_,7 @@
}
private boolean isWantedBlock(final PathfinderMob mob, final BlockState block) {
@@ -31,7 +31,7 @@
}
private static double getInteractionRange(final PathfinderMob body) {
@@ -507,6 +_,11 @@
@@ -508,6 +_,11 @@
}
private static boolean matchesLeavingItemsRequirement(final PathfinderMob body, final Container container) {
@@ -43,7 +43,7 @@
return container.isEmpty() || hasItemMatchingHandItem(body, container);
}
@@ -544,7 +_,7 @@
@@ -545,7 +_,7 @@
int slot = 0;
for (ItemStack itemStack : container) {

View File

@@ -1,14 +1,11 @@
--- a/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
+++ b/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java
@@ -54,9 +_,9 @@
@@ -54,7 +_,7 @@
}
};
Set<Pair<Holder<PoiType>, BlockPos>> pois = poiManager.findAllWithType(
- e -> e.is(PoiTypes.HOME), cacheTest, body.blockPosition(), 48, PoiManager.Occupancy.ANY
+ e -> e.is(PoiTypes.HOME), cacheTest, body.blockPosition(), level.purpurConfig.villagerNearestBedSensorSearchRadius, PoiManager.Occupancy.ANY
- e -> e.is(PoiTypes.HOME), cacheTest, body.blockPosition(), AcquirePoi.SCAN_RANGE, PoiManager.Occupancy.ANY
+ e -> e.is(PoiTypes.HOME), cacheTest, body.blockPosition(), level.purpurConfig.villagerNearestBedSensorSearchRadius, PoiManager.Occupancy.ANY // Purpur - Configurable villager search radius
)
- .collect(Collectors.toSet());
+ .collect(Collectors.toSet()); // Purpur - Configurable villager search radius
.collect(Collectors.toSet());
Path path = AcquirePoi.findPathToPois(body, pois);
if (path != null && path.canReach()) {
BlockPos targetPos = path.getTarget();

View File

@@ -36,9 +36,9 @@
if (this.isInWater()) {
+ if (canFly()) setNoGravity(!wasTouchingWater); // Purpur - Flying squids! Oh my!
if (this.tentacleMovement < (float) Math.PI) {
float tentacleScale = this.tentacleMovement / (float) Math.PI;
this.tentacleAngle = Mth.sin(tentacleScale * tentacleScale * (float) Math.PI) * (float) Math.PI * 0.25F;
if (this.tentacleMovement < Mth.PI) {
float tentacleScale = this.tentacleMovement / Mth.PI;
this.tentacleAngle = Mth.sin(tentacleScale * tentacleScale * Mth.PI) * Mth.PI * 0.25F;
@@ -321,7 +_,7 @@
int noActionTime = this.squid.getNoActionTime();
if (noActionTime > 100) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -965,6 +_,7 @@
@@ -959,6 +_,7 @@
@Override
protected boolean canRide(final Entity vehicle) {
@@ -8,7 +8,7 @@
return false;
}
@@ -1000,7 +_,7 @@
@@ -994,7 +_,7 @@
boolean shouldDrop = level.getGameRules().get(GameRules.MOB_DROPS);
int xpCount = 500;

View File

@@ -70,7 +70,7 @@
}
float totalDamage = baseDamage + magicBoost;
@@ -1746,7 +_,23 @@
@@ -1740,7 +_,23 @@
@Override
protected int getBaseExperienceReward(final ServerLevel level) {
@@ -95,7 +95,7 @@
}
@Override
@@ -1789,6 +_,13 @@
@@ -1783,6 +_,13 @@
public boolean addItem(final ItemStack itemStack) {
return this.inventory.add(itemStack);
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -64,6 +_,7 @@
@@ -65,6 +_,7 @@
private final List<ContainerListener> containerListeners = Lists.newArrayList();
private @Nullable ContainerSynchronizer synchronizer;
private boolean suppressRemoteUpdates;

View File

@@ -43,7 +43,7 @@
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
@@ -1240,6 +_,12 @@
@@ -1246,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -169,10 +_,54 @@
@@ -170,10 +_,54 @@
}
// Paper end - add paper world config
@@ -55,16 +55,16 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -848,6 +_,8 @@
@@ -850,6 +_,8 @@
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName(), environment); // Purpur - Purpur config files
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(bukkitName, environment); // Purpur - Purpur config files
+ this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur - Add adjustable breeding cooldown to config
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2188,4 +_,14 @@
@@ -2192,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
@@ -216,7 +_,7 @@
@@ -289,7 +_,7 @@
pos.set(x, yStart, z);
double xx = x + 0.5;
double zz = z + 0.5;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/DragonEggBlock.java
+++ b/net/minecraft/world/level/block/DragonEggBlock.java
@@ -49,6 +_,7 @@
@@ -50,6 +_,7 @@
}
private void teleport(final BlockState state, final Level level, final BlockPos pos) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/ObserverBlock.java
+++ b/net/minecraft/world/level/block/ObserverBlock.java
@@ -81,6 +_,7 @@
@@ -82,6 +_,7 @@
final RandomSource random
) {
if (state.getValue(FACING) == directionToNeighbour && !state.getValue(POWERED)) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -107,6 +_,10 @@
@@ -108,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) {
@@ -119,6 +_,11 @@
@@ -120,6 +_,11 @@
}
protected void saveAdditional(final ValueOutput output) {
@@ -23,7 +23,7 @@
}
public final CompoundTag saveWithFullMetadata(final HolderLookup.Provider registries) {
@@ -412,4 +_,16 @@
@@ -414,4 +_,16 @@
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
}
}

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/level/chunk/storage/EntityStorage.java
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -97,6 +_,7 @@
ListTag entities = new ListTag();
chunk.getEntities().forEach(e -> {
@@ -108,6 +_,7 @@
}
// Paper end - Entity load/save limit per chunk
TagValueOutput output = TagValueOutput.createWithContext(reporter.forChild(e.problemPath()), e.registryAccess());
+ if (!e.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity
if (e.save(output)) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -243,7 +_,7 @@
@@ -309,7 +_,7 @@
// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {