mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Use empty itemstack, not null in PlayerInteractManager
Introduced in 93e5439f96
Fixes GH-1642
This commit is contained in:
parent
93e5439f96
commit
285a69dbe1
1 changed files with 2 additions and 2 deletions
|
@ -13,14 +13,14 @@ keep the clone of the item used to a non empty value so it represents
|
|||
the item used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index 23fc4d8e14..599bdf054f 100644
|
||||
index 23fc4d8e1..0b6c25936 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||
ItemStack itemstack1 = this.player.getItemInMainHand();
|
||||
boolean flag1 = this.player.hasBlock(iblockdata);
|
||||
|
||||
+ ItemStack itemstack2 = flag && flag1 && event.isDropItems() && !itemstack1.isEmpty() ? itemstack1.cloneItemStack() : null; // Paper - MC-136865 - clone before use
|
||||
+ ItemStack itemstack2 = flag && flag1 && event.isDropItems() && !itemstack1.isEmpty() ? itemstack1.cloneItemStack() : ItemStack.a; // Paper - MC-136865 - clone before use
|
||||
itemstack1.a(this.world, iblockdata, blockposition, this.player);
|
||||
// CraftBukkit start - Check if block should drop items
|
||||
if (flag && flag1 && event.isDropItems()) {
|
||||
|
|
Loading…
Reference in a new issue