Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@94f29035 Do not blow up accessing unregistered memories from API (Fixes #12618) (#12639)
PaperMC/Paper@03efecf0 Do not fire PlayerDropItemEvent for /give command
PaperMC/Paper@3527ccdf feat: expose updateDemand and restock on Villager (#12608)
PaperMC/Paper@320f25cb fix sponge-absorb deleting chest content (#12647)
This commit is contained in:
granny
2025-06-08 12:54:36 -07:00
parent eb0ba67d83
commit 7c6502dc13
9 changed files with 38 additions and 15 deletions

View File

@@ -6,5 +6,5 @@
boolean flag = serverPlayer.getInventory().add(itemStack1);
+ if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
if (flag && itemStack1.isEmpty()) {
ItemEntity itemEntity = serverPlayer.drop(itemStack, false);
ItemEntity itemEntity = serverPlayer.drop(itemStack, false, false, false, null); // Paper - do not fire PlayerDropItemEvent for /give command
if (itemEntity != null) {

View File

@@ -104,7 +104,7 @@
@@ -504,7 +_,7 @@
private void updateDemand() {
public void updateDemand() {
for (MerchantOffer merchantOffer : this.getOffers()) {
- merchantOffer.updateDemand();
+ merchantOffer.updateDemand(this.level().purpurConfig.villagerMinimumDemand); // Purpur - Configurable minimum demand for trades

View File

@@ -19,7 +19,7 @@
+ if (!fluidState.is(FluidTags.WATER) && (!level.purpurConfig.spongeAbsorbsLava || !fluidState.is(FluidTags.LAVA)) && (!level.purpurConfig.spongeAbsorbsWaterFromMud || !blockState.is(Blocks.MUD))) { // Purpur - Option for sponges to work on lava and mud
return BlockPos.TraversalNodeStatus.SKIP;
} else if (blockState.getBlock() instanceof BucketPickup bucketPickup
&& !bucketPickup.pickupBlock(null, blockList, blockPos, blockState).isEmpty()) { // CraftBukkit
&& !bucketPickup.pickupBlock(null, level, blockPos, blockState).isEmpty()) {
@@ -76,6 +_,10 @@
} else {
if (blockState.getBlock() instanceof LiquidBlock) {

View File

@@ -24,10 +24,10 @@ index 2c87953a3b99c5e776fe06271d5cba5cc355bf53..395951c968e95adffa97e1851d104faf
Preconditions.checkArgument(entity != null, "Unknown entity");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 78846e0abe010997b6a5da04f2be4b5ffba5dd0a..5f30621d717bd0728ddc074072ab7a02c487b253 100644
index 69d92e708bac7925ff30e403e94200236536b670..fc4fa99a993a017676da2be3cb254399d421bce1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1165,4 +1165,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1167,4 +1167,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public CombatTracker getCombatTracker() {
return this.getHandle().getCombatTracker().paperCombatTracker;
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -513,7 +_,7 @@
@@ -514,7 +_,7 @@
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
this.getHandle().setLastHurtByMob(nmsKiller);
if (nmsKiller != null) {

View File

@@ -1,10 +1,9 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -380,4 +_,12 @@
public void clearReputations() {
getHandle().getGossips().gossips.clear();
@@ -390,4 +_,11 @@
public void restock() {
getHandle().restock();
}
+ // Paper end
+
+ // Purpur start - Lobotomize stuck villagers
+ @Override