Skip to content

Commit 7c6502d

Browse files
committed
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)
1 parent eb0ba67 commit 7c6502d

9 files changed

Lines changed: 38 additions & 15 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
22
version = 1.21.5-R0.1-SNAPSHOT
33

44
mcVersion = 1.21.5
5-
paperCommit = e87320d5f2c5ef7b784b2680835e0e9c101b9e30
5+
paperCommit = 320f25cb04f183c18c16595100897622c88ce073
66

77
org.gradle.configuration-cache = true
88
org.gradle.caching = true

purpur-api/build.gradle.kts.patch

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929
}
3030
}
31-
@@ -165,8 +_,10 @@
31+
@@ -165,16 +_,18 @@
3232
val services = objects.newInstance<Services>()
3333

3434
tasks.withType<Javadoc> {
@@ -40,6 +40,30 @@
4040
options.use()
4141
options.isDocFilesSubDirs = true
4242
options.links(
43+
"https://guava.dev/releases/33.3.1-jre/api/docs/",
44+
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
45+
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
46+
- "https://javadoc.io/doc/org.joml/joml/1.10.8/",
47+
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
48+
+ // "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
49+
+ // "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
50+
+ // "https://javadoc.io/doc/org.joml/joml/1.10.8/",
51+
+ // "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
52+
"https://jspecify.dev/docs/api/",
53+
"https://jd.advntr.dev/api/$adventureVersion/",
54+
"https://jd.advntr.dev/key/$adventureVersion/",
55+
@@ -183,9 +_,9 @@
56+
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
57+
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
58+
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
59+
- "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
60+
+ // "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
61+
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
62+
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
63+
+ // "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
64+
)
65+
options.tags("apiNote:a:API Note:")
66+
4367
@@ -199,11 +_,11 @@
4468
}
4569

purpur-api/paper-patches/files/src/main/java/org/bukkit/entity/Villager.java.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
--- a/src/main/java/org/bukkit/entity/Villager.java
22
+++ b/src/main/java/org/bukkit/entity/Villager.java
3-
@@ -391,4 +_,13 @@
4-
* reputation regardless of its impact and the player associated.
3+
@@ -408,4 +_,13 @@
4+
* Demand is still updated even if all events are canceled.
55
*/
6-
public void clearReputations();
6+
public void restock();
77
+
88
+ // Purpur start
99
+ /**

purpur-server/minecraft-patches/sources/net/minecraft/server/commands/GiveCommand.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
boolean flag = serverPlayer.getInventory().add(itemStack1);
77
+ if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
88
if (flag && itemStack1.isEmpty()) {
9-
ItemEntity itemEntity = serverPlayer.drop(itemStack, false);
9+
ItemEntity itemEntity = serverPlayer.drop(itemStack, false, false, false, null); // Paper - do not fire PlayerDropItemEvent for /give command
1010
if (itemEntity != null) {

purpur-server/minecraft-patches/sources/net/minecraft/world/entity/npc/Villager.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

105105
@@ -504,7 +_,7 @@
106106

107-
private void updateDemand() {
107+
public void updateDemand() {
108108
for (MerchantOffer merchantOffer : this.getOffers()) {
109109
- merchantOffer.updateDemand();
110110
+ merchantOffer.updateDemand(this.level().purpurConfig.villagerMinimumDemand); // Purpur - Configurable minimum demand for trades

purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
+ 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
2020
return BlockPos.TraversalNodeStatus.SKIP;
2121
} else if (blockState.getBlock() instanceof BucketPickup bucketPickup
22-
&& !bucketPickup.pickupBlock(null, blockList, blockPos, blockState).isEmpty()) { // CraftBukkit
22+
&& !bucketPickup.pickupBlock(null, level, blockPos, blockState).isEmpty()) {
2323
@@ -76,6 +_,10 @@
2424
} else {
2525
if (blockState.getBlock() instanceof LiquidBlock) {

purpur-server/paper-patches/features/0005-API-for-any-mob-to-burn-daylight.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ index 2c87953a3b99c5e776fe06271d5cba5cc355bf53..395951c968e95adffa97e1851d104faf
2424
Preconditions.checkArgument(entity != null, "Unknown entity");
2525

2626
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
27-
index 78846e0abe010997b6a5da04f2be4b5ffba5dd0a..5f30621d717bd0728ddc074072ab7a02c487b253 100644
27+
index 69d92e708bac7925ff30e403e94200236536b670..fc4fa99a993a017676da2be3cb254399d421bce1 100644
2828
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
2929
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
30-
@@ -1165,4 +1165,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
30+
@@ -1167,4 +1167,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
3131
public CombatTracker getCombatTracker() {
3232
return this.getHandle().getCombatTracker().paperCombatTracker;
3333
}

purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
22
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
3-
@@ -513,7 +_,7 @@
3+
@@ -514,7 +_,7 @@
44
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
55
this.getHandle().setLastHurtByMob(nmsKiller);
66
if (nmsKiller != null) {

purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
22
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
3-
@@ -380,4 +_,12 @@
4-
public void clearReputations() {
5-
getHandle().getGossips().gossips.clear();
3+
@@ -390,4 +_,11 @@
4+
public void restock() {
5+
getHandle().restock();
66
}
7-
+ // Paper end
87
+
98
+ // Purpur start - Lobotomize stuck villagers
109
+ @Override

0 commit comments

Comments
 (0)