Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@a211ac2e Remove unused warning (#12478)
PaperMC/Paper@ae512811 Add isSuffocating to Block and BlockState (#12445)
PaperMC/Paper@3409e2d7 Mace was not included in the ENCHANTABLE MaterialSetTag (#12476)
PaperMC/Paper@1cfc96bc Add keyStream() API to registries (#12479)
PaperMC/Paper@3222985e [ci/skip] Rebuild patches
PaperMC/Paper@deaccd2c [ci/skip] Add file reference url to help.yml (#12481)
PaperMC/Paper@f86b4352 Add vault change state event (#12069)
PaperMC/Paper@3e3b42cd Update player chat session sync (#12382)
PaperMC/Paper@f8fa4f6f Add method to retrieve FishHook (#12310)
PaperMC/Paper@b9d3147d Use correct placed block position for sound (#12410)
PaperMC/Paper@952338b3 [ci/skip] Add missing exception docs to Player#listPlayer (#12488)
PaperMC/Paper@1db37853 [ci/skip] improve javadoc for off-hand swaps through getHotbarButton (#12489)
PaperMC/Paper@d1810f24 Allow Server#getDefaultGameMode before worlds are initialized (#12490)
PaperMC/Paper@02d20ff7 Fix NPE in Server#getMap before worlds are loaded (#12492)
This commit is contained in:
granny
2025-04-28 18:07:23 -07:00
parent 7f5c4036f7
commit 4fdf1d117c
11 changed files with 28 additions and 28 deletions

View File

@@ -30,7 +30,7 @@ index 924dc9a32cd78f37078ff47cde54e61844572f47..d1e33c3ed23f4c68694ec3628c64e87d
/* Drop global time updates
if (this.tickCount % 20 == 0) {
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 17d021c341fb382768a0e8971bd559a11804151f..9de064829001199d6cd1bbeac05b6ee7c3000e4b 100644
index f61521a4d57c73fb65f1f314ff6061cf63943e82..d8a8e6d006d18de5ec148a0d9d6f08a6a40a65bb 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -213,6 +213,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -42,7 +42,7 @@ index 17d021c341fb382768a0e8971bd559a11804151f..9de064829001199d6cd1bbeac05b6ee7
@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 77f4d37866b74bb3865afe80b516af724cacd0be..efea20895bc45d63621dd130fc05922ba1e10f87 100644
index 4944989e535295a24ddff28a812c5eda700427e0..4ffe5bbf79d2df0b2b8c563b4f224ab120e3396a 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -800,6 +800,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -62,10 +62,10 @@ index 77f4d37866b74bb3865afe80b516af724cacd0be..efea20895bc45d63621dd130fc05922b
private void updatePlayerAttributes() {
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index db53f813d4b433f9a07a4d3169cd4fba94951c1b..6ba184b5314356214e9ff9508fba57150d92d87a 100644
index 57660e97b76c2c1e39a61f661e9621352b0963ae..08b7b7c8721595c56c562de1fe17a1bc5909e624 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2836,6 +2836,8 @@ public class ServerGamePacketListenerImpl
@@ -2829,6 +2829,8 @@ public class ServerGamePacketListenerImpl
ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
@@ -177,7 +177,7 @@ index bda521cca91f070139f5e9bdef6a50e1497f53ff..351f92e1627f465a9a292d4a5e5c256a
protected ParticleOptions getInkParticle() {
return ParticleTypes.GLOW_SQUID_INK;
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index a077e2f518be39bbdba4919ed7161bb28547e56b..a4a19d962bc4665e9368b97cae4b2534da33de91 100644
index 20d9856daa5ef4c42010381091c2a85e0755fa77..133da6ac0fff416c5849b64f053ca4cd105d00ac 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -226,9 +226,9 @@ public abstract class LivingEntity extends Entity implements Attackable {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Barrels and enderchests 6 rows
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index 0fd27e1b01801d418ce9e96ec23dd746484351a4..1ad7747379d60d49f8c27a078b2ae798c8e5d41c 100644
index fbac24945a4100515c78ced2c30e09ec2f6787bf..2a4c20c74fefe891cba74d2c8b83b01a53067fb5 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -1030,6 +1030,27 @@ public abstract class PlayerList {
@@ -1029,6 +1029,27 @@ public abstract class PlayerList {
player.getBukkitEntity().recalculatePermissions(); // CraftBukkit
this.server.getCommands().sendCommands(player);
} // Paper - Add sendOpLevel API

View File

@@ -53,10 +53,10 @@ index 18d63d2da49451a2d5e1da7bf0c00e05e2f192bc..1f081e098ce3bec61b7f374e9b737838
itemInHand.shrink(1); // Moved up from below
} else {
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
index 2f0b280d36aefc0cc2a09c395adabdffad43bf17..f1b61e98e07d1d89f9af225f99085d8a3fee878c 100644
index 6de42886ed681b5e00903f0d213e4d2fcaea1482..36677cb0db42b74fa84d67b85717f629f84b4dd0 100644
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -725,6 +725,14 @@ public final class ItemStack implements DataComponentHolder {
@@ -724,6 +724,14 @@ public final class ItemStack implements DataComponentHolder {
org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent
}
// CraftBukkit end

View File

@@ -206,7 +206,7 @@
private boolean shouldCheckPlayerMovement(boolean isElytraMovement) {
if (this.isSingleplayerOwner()) {
return false;
@@ -2070,6 +_,7 @@
@@ -2063,6 +_,7 @@
boolean cancelled;
if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) {
@@ -214,7 +214,7 @@
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemInHand, hand);
cancelled = event.useItemInHand() == Event.Result.DENY;
} else {
@@ -2742,6 +_,7 @@
@@ -2735,6 +_,7 @@
AABB boundingBox = target.getBoundingBox();
if (this.player.canInteractWithEntity(boundingBox, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0))) { // Paper - configurable lenience value for interact range

View File

@@ -25,7 +25,7 @@
event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure
}
}
@@ -921,6 +_,20 @@
@@ -920,6 +_,20 @@
}
}
@@ -46,7 +46,7 @@
public void broadcastAll(Packet<?> packet, ResourceKey<Level> dimension) {
for (ServerPlayer serverPlayer : this.players) {
if (serverPlayer.level().dimension() == dimension) {
@@ -1005,6 +_,7 @@
@@ -1004,6 +_,7 @@
} else {
b = (byte)(24 + permLevel);
}

View File

@@ -16,7 +16,7 @@
serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
}
@@ -618,6 +_,26 @@
@@ -617,6 +_,26 @@
return this.isDamageableItem() && this.getDamageValue() > 0;
}
@@ -43,7 +43,7 @@
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
@@ -1280,6 +_,12 @@
@@ -1279,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -423,6 +_,20 @@
@@ -424,6 +_,20 @@
this.paperPluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(this, this.commandMap, pluginManager);
this.pluginManager.paperPluginManager = this.paperPluginManager;
// Paper end
@@ -21,7 +21,7 @@
CraftRegistry.setMinecraftRegistry(console.registryAccess());
@@ -1067,6 +_,7 @@
@@ -1068,6 +_,7 @@
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -29,7 +29,7 @@
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1082,6 +_,7 @@
@@ -1083,6 +_,7 @@
}
}
world.spigotConfig.init(); // Spigot
@@ -37,7 +37,7 @@
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1099,6 +_,7 @@
@@ -1100,6 +_,7 @@
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
this.spark.registerCommandBeforePlugins(this); // Paper - spark
@@ -45,7 +45,7 @@
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -1598,6 +_,60 @@
@@ -1599,6 +_,60 @@
return true;
}
@@ -106,7 +106,7 @@
@Override
public List<Recipe> getRecipesFor(ItemStack result) {
Preconditions.checkArgument(result != null, "ItemStack cannot be null");
@@ -2945,6 +_,18 @@
@@ -2951,6 +_,18 @@
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
@@ -125,7 +125,7 @@
@Override
public void restart() {
CraftServer.this.restart();
@@ -2977,6 +_,7 @@
@@ -2983,6 +_,7 @@
@Override
public double[] getTPS() {
return new double[] {
@@ -133,7 +133,7 @@
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
@@ -3184,4 +_,18 @@
@@ -3190,4 +_,18 @@
public void allowPausing(final Plugin plugin, final boolean value) {
this.console.addPluginAllowingSleep(plugin.getName(), value);
}