Update to 1.21.10 & Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@0ff899da Prevent world mutation on copper golem spawn cancel (#13152)
PaperMC/Paper@bae47d3e Update to 1.21.10 (#13127)
PaperMC/Paper@8339bb31 Update DataConverter constants for 1.21.10
PaperMC/Paper@3982efa0 Sync Moonrise
PaperMC/Paper@fa57d4b7 Remove Vanilla packet processing at start of tick
PaperMC/Paper@fba780d6 Rebuild patches
This commit is contained in:
granny
2025-10-07 20:50:28 -07:00
parent a99ba03624
commit d7de13dd4d
15 changed files with 62 additions and 62 deletions

View File

@@ -25,7 +25,7 @@
getTPS(this.tickTimes1m, now, interval),
getTPS(this.tickTimes5m, now, interval),
getTPS(this.tickTimes15m, now, interval)
@@ -964,6 +_,15 @@
@@ -980,6 +_,15 @@
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -41,7 +41,7 @@
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1062,6 +_,8 @@
@@ -1078,6 +_,8 @@
this.safeShutdown(waitForShutdown, false);
}
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
@@ -50,7 +50,7 @@
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1245,6 +_,16 @@
@@ -1261,6 +_,16 @@
}
// Paper end - Add onboarding message for initial server start
@@ -67,7 +67,7 @@
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
long l; // Paper - improve tick loop - diff on change, expect this to be tick interval
@@ -1258,8 +_,10 @@
@@ -1274,8 +_,10 @@
final long ticksBehind = Math.max(1L, this.tickSchedule.getPeriodsAhead(l, tickStart));
final long catchup = (long)Math.max(
1,
@@ -79,7 +79,7 @@
// adjust ticksBehind so that it is not greater-than catchup
if (ticksBehind > catchup) {
@@ -1730,7 +_,7 @@
@@ -1746,7 +_,7 @@
long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) {
@@ -88,7 +88,7 @@
continue;
}
ServerPlayer entityplayer = (ServerPlayer) entityhuman;
@@ -1902,7 +_,7 @@
@@ -1918,7 +_,7 @@
@DontObfuscate
public String getServerModName() {

View File

@@ -9,7 +9,7 @@
private final RandomSequences randomSequences;
final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this);
@@ -609,8 +_,25 @@
@@ -616,8 +_,25 @@
// CraftBukkit end
this.tickTime = tickTime;
this.server = server;
@@ -36,7 +36,7 @@
ChunkGenerator chunkGenerator = levelStem.generator();
// CraftBukkit start
this.serverLevelData.setWorld(this);
@@ -692,6 +_,7 @@
@@ -699,6 +_,7 @@
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -44,7 +44,7 @@
}
// Paper start
@@ -738,7 +_,7 @@
@@ -745,7 +_,7 @@
}
int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
@@ -53,7 +53,7 @@
// Paper start - create time skip event - move up calculations
final long newDayTime = this.levelData.getDayTime() + 24000L;
org.bukkit.event.world.TimeSkipEvent event = new org.bukkit.event.world.TimeSkipEvent(
@@ -872,6 +_,13 @@
@@ -879,6 +_,13 @@
this.serverLevelData.getScheduledEvents().tick(this.server, l);
Profiler.get().pop();
if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
@@ -67,7 +67,7 @@
this.setDayTime(this.levelData.getDayTime() + 1L);
}
}
@@ -879,6 +_,20 @@
@@ -886,6 +_,20 @@
public void setDayTime(long time) {
this.serverLevelData.setDayTime(time);
@@ -88,7 +88,7 @@
}
public void tickCustomSpawners(boolean spawnEnemies) {
@@ -983,9 +_,17 @@
@@ -990,9 +_,17 @@
&& this.random.nextDouble() < currentDifficultyAt.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses
&& !this.getBlockState(blockPos.below()).is(BlockTags.LIGHTNING_RODS);
if (flag) {
@@ -108,7 +108,7 @@
skeletonHorse.setAge(0);
skeletonHorse.setPos(blockPos.getX(), blockPos.getY(), blockPos.getZ());
this.addFreshEntity(skeletonHorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
@@ -1020,9 +_,35 @@
@@ -1027,9 +_,35 @@
if (blockState.is(Blocks.SNOW)) {
int layersValue = blockState.getValue(SnowLayerBlock.LAYERS);
if (layersValue < Math.min(_int, 8)) {
@@ -144,7 +144,7 @@
}
} else {
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, heightmapPos, Blocks.SNOW.defaultBlockState(), 3, null); // CraftBukkit
@@ -1043,7 +_,7 @@
@@ -1050,7 +_,7 @@
holder -> holder.is(PoiTypes.LIGHTNING_ROD),
blockPos -> blockPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockPos.getX(), blockPos.getZ()) - 1,
pos,
@@ -153,7 +153,7 @@
PoiManager.Occupancy.ANY
);
return optional.map(blockPos -> blockPos.above(1));
@@ -1092,8 +_,26 @@
@@ -1099,8 +_,26 @@
int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
Component component;
if (this.sleepStatus.areEnoughSleeping(_int)) {
@@ -180,7 +180,7 @@
component = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(_int));
}
@@ -1230,6 +_,7 @@
@@ -1237,6 +_,7 @@
@VisibleForTesting
public void resetWeatherCycle() {
// CraftBukkit start
@@ -188,7 +188,7 @@
this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1237,6 +_,7 @@
@@ -1244,6 +_,7 @@
this.serverLevelData.setRainTime(0);
}
// CraftBukkit end
@@ -196,7 +196,7 @@
this.serverLevelData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// CraftBukkit start
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
@@ -2797,7 +_,7 @@
@@ -2804,7 +_,7 @@
// Spigot start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal

View File

@@ -68,7 +68,7 @@
this.onBelowWorld();
}
}
@@ -1937,7 +_,7 @@
@@ -1942,7 +_,7 @@
}
public boolean fireImmune() {
@@ -77,7 +77,7 @@
}
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -2637,6 +_,11 @@
@@ -2642,6 +_,11 @@
output.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -89,7 +89,7 @@
} catch (Throwable var7) {
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
@@ -2757,6 +_,9 @@
@@ -2762,6 +_,9 @@
}
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
// Paper end
@@ -99,7 +99,7 @@
} catch (Throwable var7) {
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -3030,6 +_,7 @@
@@ -3035,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable2) {
if (leashable2.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
@@ -107,7 +107,7 @@
// Paper start - EntityUnleashEvent
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
leashable2, player, hand, !player.hasInfiniteMaterials(), true
@@ -3454,15 +_,18 @@
@@ -3459,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -127,7 +127,7 @@
}
}
}
@@ -3667,7 +_,7 @@
@@ -3672,7 +_,7 @@
}
public int getMaxAirSupply() {
@@ -136,7 +136,7 @@
}
public int getAirSupply() {
@@ -4229,7 +_,7 @@
@@ -4234,7 +_,7 @@
// CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) {
@@ -145,7 +145,7 @@
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4744,6 +_,12 @@
@@ -4749,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot);
}
@@ -158,7 +158,7 @@
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
@@ -5161,7 +_,7 @@
@@ -5166,7 +_,7 @@
}
public float maxUpStep() {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/BubbleColumnBlock.java
+++ b/net/minecraft/world/level/block/BubbleColumnBlock.java
@@ -98,9 +_,9 @@
@@ -100,9 +_,9 @@
if (blockState.is(Blocks.BUBBLE_COLUMN)) {
return blockState;
} else if (blockState.is(Blocks.SOUL_SAND)) {

View File

@@ -24,10 +24,10 @@
if (copperGolem != null) {
- spawnGolemInWorld(level, blockPatternMatch2, copperGolem, blockPatternMatch2.getBlock(0, 0, 0).getPos());
+ spawnGolemInWorld(level, blockPatternMatch2, copperGolem, blockPatternMatch2.getBlock(0, 0, 0).getPos(), this.placer); // Purpur - Summoner API
if (!copperGolem.valid) return; // Paper - entityspawnevent - entity was not added to the world so prevent world mutation
this.replaceCopperBlockWithChest(level, blockPatternMatch2);
copperGolem.spawn(this.getWeatherStateFromPattern(blockPatternMatch2));
}
@@ -111,7 +_,20 @@
@@ -112,7 +_,20 @@
.getAge();
}

View File

@@ -2,7 +2,7 @@
+++ b/net/minecraft/world/level/block/CropBlock.java
@@ -169,7 +_,7 @@
@Override
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier) {
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean flag) {
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent
- if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
+ if (level instanceof ServerLevel serverLevel && entity instanceof Ravager && serverLevel.purpurConfig.ravagerGriefableBlocks.contains(serverLevel.getBlockState(pos).getBlock()) && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !serverLevel.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit // Purpur - Configurable ravager griefable blocks list