Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@a2c9f58a Update to 1.21.11-pre3 (#13194)
PaperMC/Paper@168287b2 Update exact choice recipe patch (#13346)
PaperMC/Paper@354a5d54 [ci/skip] Add missing Nullable annotation for KineticWeapon.Builder methods (#13347)
PaperMC/Paper@df4b6681 Restore legacy command restrictions
PaperMC/Paper@2efb4e7a Merge branch 'ver/1.21.10'
PaperMC/Paper@fdfdec66 Trigger build after merge commit
PaperMC/Paper@6348ac89 Schedule PlayerSpawnFinder chunk callbacks to mainThreadProcessor instead of server queue fixes #13354
PaperMC/Paper@b786cbe8 Update to 1.21.11-pre4 (#13357)
PaperMC/Paper@889c6617 Flush region storage if configured for ChunkMap#synchronize
PaperMC/Paper@c7a138b0 Remove ItemStack mutation on drop methods (#11831)
PaperMC/Paper@1d09b617 Fix ItemType#isEdible to also check for DataComponents#CONSUMABLE (#13348)
PaperMC/Paper@84a789b2 Add Decorated Pot wobble API (#12994)
PaperMC/Paper@ec0ad8b9 Update to 1.21.11-pre5
PaperMC/Paper@ffce96cf Fix wrong translation key in /give command (#13364)
PaperMC/Paper@1cb31fd3 Update to 1.21.11-rc1
PaperMC/Paper@51c1b16b Optimize getEntityCount by directly accessing Moonrise data structures
This commit is contained in:
granny
2025-12-04 19:39:48 -08:00
parent 9586ff19a1
commit 712e1c3f72
25 changed files with 96 additions and 96 deletions

View File

@@ -68,7 +68,7 @@
this.onBelowWorld();
}
}
@@ -1956,7 +_,7 @@
@@ -1960,7 +_,7 @@
}
public boolean fireImmune() {
@@ -77,7 +77,7 @@
}
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -2654,6 +_,11 @@
@@ -2658,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");
@@ -2774,6 +_,9 @@
@@ -2778,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");
@@ -3039,6 +_,7 @@
@@ -3041,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
@@ -3469,15 +_,18 @@
@@ -3471,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -127,7 +127,7 @@
}
}
}
@@ -3683,7 +_,7 @@
@@ -3685,7 +_,7 @@
}
public int getMaxAirSupply() {
@@ -136,7 +136,7 @@
}
public int getAirSupply() {
@@ -4218,7 +_,7 @@
@@ -4220,7 +_,7 @@
}
public boolean canUsePortal(boolean allowPassengers) {
@@ -145,7 +145,7 @@
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4737,6 +_,12 @@
@@ -4739,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()) {
@@ -5157,7 +_,7 @@
@@ -5159,7 +_,7 @@
}
public float maxUpStep() {

View File

@@ -173,7 +173,7 @@
this.hurt(this.damageSources().flyIntoWall(), f);
}
}
@@ -4671,6 +_,12 @@
@@ -4666,6 +_,12 @@
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/Animal.java
+++ b/net/minecraft/world/entity/animal/Animal.java
@@ -140,7 +_,7 @@
@@ -146,7 +_,7 @@
ItemStack itemInHand = player.getItemInHand(hand);
if (this.isFood(itemInHand)) {
int age = this.getAge();
@@ -9,7 +9,7 @@
final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying
this.usePlayerItem(player, hand, itemInHand);
this.setInLove(serverPlayer, breedCopy); // Paper - Fix EntityBreedEvent copying
@@ -221,10 +_,20 @@
@@ -227,10 +_,20 @@
public void spawnChildFromBreeding(ServerLevel level, Animal partner) {
AgeableMob breedOffspring = this.getBreedOffspring(level, partner);
if (breedOffspring != null) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/pig/Pig.java
+++ b/net/minecraft/world/entity/animal/pig/Pig.java
@@ -142,6 +_,19 @@
@@ -138,6 +_,19 @@
@Override
public InteractionResult mobInteract(Player player, InteractionHand hand) {
boolean isFood = this.isFood(player.getItemInHand(hand));

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
@@ -137,10 +_,10 @@
@@ -159,10 +_,10 @@
public InteractionResult mobInteract(Player player, InteractionHand hand) {
ItemStack itemInHand = player.getItemInHand(hand);
if (itemInHand.is(Items.GOLDEN_APPLE)) {

View File

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

View File

@@ -3,13 +3,13 @@
@@ -36,6 +_,7 @@
// CraftBukkit start
@javax.annotation.Nullable
private java.util.List<ItemStack> itemStacks;
private java.util.Set<ItemStack> itemStacks; // Paper - Improve exact choice recipe ingredients
+ public Predicate<org.bukkit.inventory.ItemStack> predicate; // Purpur - Add predicate to recipe's ExactChoice ingredient
public boolean isExact() {
return this.itemStacks != null;
@@ -90,6 +_,11 @@
return false;
@@ -88,6 +_,11 @@
return this.itemStacks.contains(stack); // Paper - Improve exact choice recipe ingredients (hashing FTW!)
}
// CraftBukkit end
+ // Purpur start - Add predicate to recipe's ExactChoice ingredient

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -165,11 +_,55 @@
@@ -166,11 +_,55 @@
}
// Paper end - add paper world config
@@ -56,7 +56,7 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -844,6 +_,8 @@
@@ -846,6 +_,8 @@
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
@@ -65,11 +65,11 @@
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2071,4 +_,14 @@
return this.id;
}
@@ -2081,4 +_,14 @@
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
}
+
// Paper end - allow patching this logic
+
+ // Purpur start - Add allow water in end world option
+ public boolean isNether() {
+ return getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/NaturalSpawner.java
+++ b/net/minecraft/world/level/NaturalSpawner.java
@@ -209,7 +_,7 @@
@@ -264,7 +_,7 @@
mutableBlockPos.set(x, y, z);
double d = x + 0.5;
double d1 = z + 0.5;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -104,6 +_,10 @@
@@ -105,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(ValueInput input) {
@@ -116,6 +_,11 @@
@@ -117,6 +_,11 @@
}
protected void saveAdditional(ValueOutput output) {
@@ -23,7 +23,7 @@
}
public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) {
@@ -400,4 +_,16 @@
@@ -402,4 +_,16 @@
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
}
}