Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@906df69 Prevent internal NPE on ItemStack#damage (#10836)
  • Loading branch information
granny committed Jun 10, 2024
1 parent 4873495 commit eac4198
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.20.6-R0.1-SNAPSHOT

mcVersion = 1.20.6
paperCommit = bd5867a96f792f0eb32c1d249bb4bbc1d8338d14
paperCommit = 906df69f05d0779906377abb809bfec9fc3c3546

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0057-Implement-elytra-settings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ index 218f2f085309f04438f8b07bc41cf242583db2dc..ea8e49b42b9dde74784189430be66ed6
itemStack.shrink(1);
} else ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 6ab9bc3da937f259b4d5b4ef69c011170b1f6783..ddf746734697305c405c53d29066c8b3003f1bf9 100644
index 37b037f167fe5b85eede525bdff2e3aab8c04eda..c3a4158df98d52854d777f986d8a8b962ea55e29 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -665,7 +665,7 @@ public final class ItemStack implements DataComponentHolder {
Expand All @@ -58,9 +58,9 @@ index 6ab9bc3da937f259b4d5b4ef69c011170b1f6783..ddf746734697305c405c53d29066c8b3
int k = 0;

for (int l = 0; j > 0 && l < amount; ++l) {
@@ -741,6 +741,12 @@ public final class ItemStack implements DataComponentHolder {
@@ -748,6 +748,12 @@ public final class ItemStack implements DataComponentHolder {
this.hurtAndBreak(amount, randomsource, entity, () -> { // Paper - Add EntityDamageItemEvent
entity.broadcastBreakEvent(slot);
if (slot != null) entity.broadcastBreakEvent(slot); // Paper - ItemStack damage API - slot is nullable
Item item = this.getItem();
+ // Purpur start
+ if (item == Items.ELYTRA) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0148-Config-to-allow-for-unsafe-enchants.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ index 5cadd69bcae33b1de58806fcf40533850d976154..17067510990f575bf638f6a95ed0d964
((ServerPlayer) player).connection.send(new ClientboundContainerSetDataPacket(containerId, 0, cost.get()));
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index ddf746734697305c405c53d29066c8b3003f1bf9..d606c15385273796fbbd2b503cda6e262be358b2 100644
index c3a4158df98d52854d777f986d8a8b962ea55e29..18f0652da2b7a8572463fcf302eb4d35480daf1a 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -1228,6 +1228,16 @@ public final class ItemStack implements DataComponentHolder {
@@ -1235,6 +1235,16 @@ public final class ItemStack implements DataComponentHolder {
return !((ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY)).isEmpty();
}

Expand Down

0 comments on commit eac4198

Please sign in to comment.