Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@15309f9a Update to 1.21.11-rc2
PaperMC/Paper@f34efdb7 Pass SWEEP_ATTACK knockback reason
PaperMC/Paper@eb37433d Re-add configurable combat exhaustion and event
PaperMC/Paper@31af44d2 Re-add dropped hunk for visibility sounds
PaperMC/Paper@252cfe14 Fix unnecessary player info remove packets being sent when hiding players (#12587)
PaperMC/Paper@62dc8b32 Use book packet for both methods (#13298)
PaperMC/Paper@7fdc16a8  Add configuration option to control fix for MC-159283 end rings (#13363)
PaperMC/Paper@bb6c2d08 Use correct addresses for PlayerConnection (#13307)
PaperMC/Paper@f08aad23 [ci/skip] Clarify Metadata API deprecation message (#13371)
PaperMC/Paper@5f03e110 Fix isInteractable for copper chests (#13325)
PaperMC/Paper@a339457c Readd dropped shulker box block hunk
PaperMC/Paper@843cafd8 Update to 1.21.11-rc3
PaperMC/Paper@7db609b0 [ci/skip] diff housekeeping
PaperMC/Paper@f6e937b9 Reimplement int based gamerule access (#13372)
This commit is contained in:
granny
2025-12-08 19:24:46 -08:00
parent 4385807b7e
commit c51992977f
10 changed files with 143 additions and 34 deletions

View File

@@ -1,9 +1,9 @@
group = org.purpurmc.purpur
version = 1.21.11-rc1-R0.1-SNAPSHOT
version = 1.21.11-rc3-R0.1-SNAPSHOT
mcVersion = 1.21.11-rc1
mcVersion = 1.21.11-rc3
apiVersion=1.21.11
paperCommit = 51c1b16b5b67396b32692d779d019183875f004c
paperCommit = f6e937b97856bf72e7932eccf930a405859288e8
org.gradle.configuration-cache = true
org.gradle.caching = true

View File

@@ -153,7 +153,7 @@ index c133b6796c0251500801b2e41df9ae4b38d111a1..468df93a0302f200c2bd5e9bc65feccd
+ // Purpur end - Ridables
}
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 64e15642d556700b1ff4c6ab3a4acea48b3d8edd..be73b3c4c071e4094e55b30bc10278fdcee21ba7 100644
index aeadca3aa7baf337aff8c8e24bf557f6a9db322a..6e0a2741db06f93f31349515d1d13181b70e08ed 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -244,9 +244,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -243,7 +243,7 @@ index 64e15642d556700b1ff4c6ab3a4acea48b3d8edd..be73b3c4c071e4094e55b30bc10278fd
// Paper end - Add EntityMoveEvent
if (this.level() instanceof ServerLevel serverLevel && this.isSensitiveToWater() && this.isInWaterOrRain()) {
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index e79d46bc349d8db559086e1f563b2c0a7793b6e4..d8faed1fc3ead010f0abd8ffdf3428881472a25c 100644
index dd0f83b9355271f7aab15eb49833f518e499595e..c519f3f501963bde3f1cadf24f88edd2a043215d 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -156,8 +156,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -4893,7 +4893,7 @@ index 3b931c6105ea14add0d2a60dc19cc3601a092a3b..4f4bf16cfa1390f19a7e8745d86e42e2
&& this.level() == entity.level()
&& EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(entity)
diff --git a/net/minecraft/world/entity/monster/zombie/Drowned.java b/net/minecraft/world/entity/monster/zombie/Drowned.java
index b189d8aaea16d977aef05a443b82eeabdb51715d..2c637796399a9b33e03e6e99618a28bf55f36110 100644
index 604d5e6a4962de61fb97988a2f3de2965908bada..03c801d5982eed73fd8f56f63ccab570e83b8a53 100644
--- a/net/minecraft/world/entity/monster/zombie/Drowned.java
+++ b/net/minecraft/world/entity/monster/zombie/Drowned.java
@@ -74,6 +74,23 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -4920,7 +4920,7 @@ index b189d8aaea16d977aef05a443b82eeabdb51715d..2c637796399a9b33e03e6e99618a28bf
@Override
protected PathNavigation createNavigation(Level level) {
return new AmphibiousPathNavigation(this, level);
@@ -429,7 +446,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -433,7 +450,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
}
}
@@ -4929,7 +4929,7 @@ index b189d8aaea16d977aef05a443b82eeabdb51715d..2c637796399a9b33e03e6e99618a28bf
private final Drowned drowned;
public DrownedMoveControl(Drowned mob) {
@@ -438,7 +455,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -442,7 +459,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
}
@Override
@@ -4938,7 +4938,7 @@ index b189d8aaea16d977aef05a443b82eeabdb51715d..2c637796399a9b33e03e6e99618a28bf
LivingEntity target = this.drowned.getTarget();
if (this.drowned.wantsToSwim() && this.drowned.isInWater()) {
if (target != null && target.getY() > this.drowned.getY() || this.drowned.searchingForLand) {
@@ -458,7 +475,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -462,7 +479,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
float f = (float)(Mth.atan2(d2, d) * 180.0F / (float)Math.PI) - 90.0F;
this.drowned.setYRot(this.rotlerp(this.drowned.getYRot(), f, 90.0F));
this.drowned.yBodyRot = this.drowned.getYRot();
@@ -4947,7 +4947,7 @@ index b189d8aaea16d977aef05a443b82eeabdb51715d..2c637796399a9b33e03e6e99618a28bf
float f2 = Mth.lerp(0.125F, this.drowned.getSpeed(), f1);
this.drowned.setSpeed(f2);
this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add(f2 * d * 0.005, f2 * d1 * 0.1, f2 * d2 * 0.005));
@@ -467,7 +484,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -471,7 +488,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add(0.0, -0.008, 0.0));
}
@@ -5179,7 +5179,7 @@ index aceeb9919473f5ff1b84efe950d10aa4dbc10121..5c7da654ef967356173a9d85a8675a7d
if (this.level().purpurConfig.wanderingTraderAllowTrading) { // Purpur - Add config for villager trading
this.setTradingPlayer(player);
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
index 15ff99dba0214721e781751731ea7f68482706cf..4bf98783e7199bc5c7c05c953729523b0b75b2b5 100644
index f5d3aa7c1e008377f9ac06401e88dae8c671ec13..eee303b4e0fa22a3d037e5fb3bf31946f41744cf 100644
--- a/net/minecraft/world/entity/player/Player.java
+++ b/net/minecraft/world/entity/player/Player.java
@@ -199,6 +199,19 @@ public abstract class Player extends Avatar implements ContainerUser {

View File

@@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <contact@granny.dev>
Date: Mon, 8 Dec 2025 17:02:40 -0800
Subject: [PATCH] Setting to reintroduce end void rings
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index cf817b5bab8e936bd40477d40359c35f2bf1d5fc..afb88446dc0aa2a3b0c4cbcdb44279c3c80ff076 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1314,6 +1314,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Purpur end - config for startup commands
+ // Purpur start - Migrate Setting to reintroduce end void rings
+ if (org.purpurmc.purpur.configuration.transformation.FarEndTerrainGenerationMigration.HAS_BEEN_REGISTERED) {
+ try {
+ org.purpurmc.purpur.PurpurConfig.config.save((java.io.File) this.options.valueOf("purpur-settings"));
+ } catch (IOException ex) {
+ org.bukkit.Bukkit.getLogger().log(java.util.logging.Level.SEVERE, "Could not save " + this.options.valueOf("purpur-settings"), ex);
+ }
+ }
+ // Purpur end - Migrate Setting to reintroduce end void rings
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index 6a0ccd6eb3e355348c68db3de980f4eddea1aaea..829ea2888927a3bd8b1b1e1961cdcff55c1cf3ce 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -258,6 +258,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc.
+ // Purpur start - Migrate Setting to reintroduce end void rings
+ try {
+ org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings"));
+ } catch (Exception e) {
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
+ return false;
+ }
+ org.purpurmc.purpur.PurpurConfig.registerCommands();
+ // Purpur end - Migrate Setting to reintroduce end void rings
// Paper start - initialize global and world-defaults configuration
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());

View File

@@ -65,7 +65,7 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2081,4 +_,14 @@
@@ -2091,4 +_,14 @@
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
}
// Paper end - allow patching this logic

View File

@@ -35,9 +35,9 @@
);
}
}
@@ -308,6 +_,27 @@
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, LevelBasedPermissionSet.GAMEMASTER, string, component, level.getServer(), player
); // Paper - Fix commands from signs not firing command events
@@ -307,6 +_,27 @@
// CraftBukkit - this
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, LevelBasedPermissionSet.GAMEMASTER, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events
}
+
+ // Purpur start - Signs allow color codes

View File

@@ -1,11 +0,0 @@
--- a/net/minecraft/world/level/levelgen/DensityFunctions.java
+++ b/net/minecraft/world/level/levelgen/DensityFunctions.java
@@ -534,7 +_,7 @@
int i1 = z / 2;
int i2 = x % 2;
int i3 = z % 2;
- float f = 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow
+ float f = 100.0F - Mth.sqrt(org.purpurmc.purpur.PurpurConfig.generateEndVoidRings ? x * x + z * z : (long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow // Purpur - Setting to reintroduce end void rings
f = Mth.clamp(f, -100.0F, 80.0F);
NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/phys/AABB.java
+++ b/net/minecraft/world/phys/AABB.java
@@ -475,4 +_,10 @@
@@ -474,4 +_,10 @@
return new AABB(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ);
}
}

View File

@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <contact@granny.dev>
Date: Mon, 8 Dec 2025 15:44:50 -0800
Subject: [PATCH] Setting to reintroduce end void rings
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index c52d2530f6bfd601e8af8fd6713e6870cf5611d3..c95bca1a3100952fb02a7bff46fcf9155b185a80 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -300,6 +300,7 @@ public class GlobalConfiguration extends ConfigurationPart {
}
}
+ @Setting(org.purpurmc.purpur.configuration.transformation.FarEndTerrainGenerationMigration.MISC_KEY) // Purpur - Migrate Setting to reintroduce end void rings
public Misc misc;
public class Misc extends ConfigurationPart {
@@ -346,6 +347,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@Comment("Whether the nether dimension is enabled and will be loaded.")
public boolean enableNether = true;
@Comment("Keeps Paper's fix for MC-159283 enabled. Disable to use vanilla End ring terrain.")
+ @Setting(org.purpurmc.purpur.configuration.transformation.FarEndTerrainGenerationMigration.FIX_FAR_END_TERRAIN_GENERATION_KEY) // Purpur - Migrate Setting to reintroduce end void rings
public boolean fixFarEndTerrainGeneration = true;
}
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
index e0491ef5cfc06b5c23d448b8c9679a17e58bca26..0d3d9bd2f6aa1284dc237b5169372a2431c85fb8 100644
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
@@ -291,6 +291,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
for (NodePath path : RemovedConfigurations.REMOVED_GLOBAL_PATHS) {
builder.addAction(path, TransformAction.remove());
}
+ org.purpurmc.purpur.configuration.transformation.FarEndTerrainGenerationMigration.apply(builder); // Purpur - Migrate Setting to reintroduce end void rings
builder.build().apply(node);
final ConfigurationTransformation.VersionedBuilder versionedBuilder = Transformations.versionedBuilder();

View File

@@ -74,8 +74,8 @@ public class PurpurConfig {
commands = new HashMap<>();
commands.put("purpur", new PurpurCommand("purpur"));
version = getInt("config-version", 45);
set("config-version", 45);
version = getInt("config-version", 46);
set("config-version", 46);
readConfig(PurpurConfig.class, null);
@@ -610,9 +610,4 @@ public class PurpurConfig {
startupCommands.add(command);
});
}
public static boolean generateEndVoidRings = false;
private static void generateEndVoidRings() {
generateEndVoidRings = getBoolean("settings.generate-end-void-rings", generateEndVoidRings);
}
}

View File

@@ -0,0 +1,41 @@
package org.purpurmc.purpur.configuration.transformation;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.purpurmc.purpur.PurpurConfig;
import org.spongepowered.configurate.ConfigurateException;
import org.spongepowered.configurate.ConfigurationNode;
import org.spongepowered.configurate.NodePath;
import org.spongepowered.configurate.transformation.ConfigurationTransformation;
import org.spongepowered.configurate.transformation.TransformAction;
import static org.spongepowered.configurate.NodePath.path;
public class FarEndTerrainGenerationMigration implements TransformAction {
public static boolean HAS_BEEN_REGISTERED = false;
public static final String MISC_KEY = "misc";
public static final String FIX_FAR_END_TERRAIN_GENERATION_KEY = "fix-far-end-terrain-generation";
@Override
public Object @Nullable [] visitPath(final NodePath path, final ConfigurationNode value) throws ConfigurateException {
String purpurGenerateEndVoidRingsPath = "settings.generate-end-void-rings";
ConfigurationNode fixFarEndTerrainGenerationNode = value.node(MISC_KEY, FIX_FAR_END_TERRAIN_GENERATION_KEY);
if (PurpurConfig.config.contains(purpurGenerateEndVoidRingsPath)) {
boolean purpurGenerateEndVoidRings = PurpurConfig.config.getBoolean(purpurGenerateEndVoidRingsPath);
if (purpurGenerateEndVoidRings) {
fixFarEndTerrainGenerationNode.set(false);
}
PurpurConfig.config.set(purpurGenerateEndVoidRingsPath, null);
}
return null;
}
public static void apply(final ConfigurationTransformation.Builder builder) {
if (PurpurConfig.version < 46) {
HAS_BEEN_REGISTERED = true;
builder.addAction(path(), new FarEndTerrainGenerationMigration());
}
}
}