Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d25437bc Update to Minecraft 1.18-pre8 CraftBukkit Changes: 5a39a236 Update to Minecraft 1.18-pre8 Spigot Changes: 7840c2af Update to Minecraft 1.18-pre8
This commit is contained in:
parent
5a2d3b2b29
commit
00be0b7b30
109 changed files with 547 additions and 539 deletions
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 00900427e88f8e9118df4fb2e0e98c26b9f1b7d4..077e5f4f787cdf4b8e7ba08dbc0c7bf04a6e5b93 100644
|
||||
index 8bdaf925580480a9467b5611e77580bb205c0a4a..bb53c547e31ed9d7bcc04b06d774b70607ef927f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3558,9 +3558,14 @@ public abstract class LivingEntity extends Entity {
|
||||
|
|
@ -24,18 +24,18 @@ index 00900427e88f8e9118df4fb2e0e98c26b9f1b7d4..077e5f4f787cdf4b8e7ba08dbc0c7bf0
|
|||
this.useItem = itemstack;
|
||||
this.useItemRemaining = itemstack.getUseDuration();
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -3638,6 +3643,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@@ -3639,6 +3644,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
+ this.startUsingItem(this.getUsedItemHand(), true); // Paper
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3672,8 +3678,8 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3673,8 +3679,8 @@ public abstract class LivingEntity extends Entity {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
this.stopUsingItem();
|
||||
- // Paper start - if the replacement is anything but the default, update the client inventory
|
||||
- if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
|
||||
+ // Paper start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue