mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-18 08:36:13 +01:00
9ff01b16ab
This will be used by my next commit. But trying to get the build going since CI blew up
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From cb0cd69765009c61da1bfe006de106ba65eee7fa Mon Sep 17 00:00:00 2001
|
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
|
Date: Tue, 22 Mar 2016 16:00:16 -0400
|
|
Subject: [PATCH] Use correct item in arrow pickup event
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
index 8c261d0..97948f4 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
@@ -430,7 +430,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
|
public void d(EntityHuman entityhuman) {
|
|
if (!this.world.isClientSide && this.inGround && this.shake <= 0) {
|
|
// CraftBukkit start
|
|
- ItemStack itemstack = new ItemStack(Items.ARROW);
|
|
+ ItemStack itemstack = this.j(); // Paper - Use the correct item
|
|
if (this.fromPlayer == PickupStatus.ALLOWED && entityhuman.inventory.canHold(itemstack) > 0) {
|
|
EntityItem item = new EntityItem(this.world, this.locX, this.locY, this.locZ, itemstack);
|
|
|
|
@@ -445,7 +445,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
|
// CraftBukkit end
|
|
boolean flag = this.fromPlayer == EntityArrow.PickupStatus.ALLOWED || this.fromPlayer == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.abilities.canInstantlyBuild;
|
|
|
|
- if (this.fromPlayer == EntityArrow.PickupStatus.ALLOWED && !entityhuman.inventory.pickup(this.j())) {
|
|
+ if (this.fromPlayer == EntityArrow.PickupStatus.ALLOWED && !entityhuman.inventory.pickup(itemstack)) { // Paper - Use event itemstack
|
|
flag = false;
|
|
}
|
|
|
|
--
|
|
2.7.4
|
|
|