2016-08-27 23:41:58 +00:00
|
|
|
From 29da1473760184b2509d1dca0926be9cbf52a558 Mon Sep 17 00:00:00 2001
|
2016-03-26 08:38:02 +00:00
|
|
|
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
|
2016-06-23 02:18:41 +00:00
|
|
|
index b7ac5f7..37cb17c 100644
|
2016-03-26 08:38:02 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
2016-06-09 03:57:14 +00:00
|
|
|
@@ -444,7 +444,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
2016-03-26 08:38:02 +00:00
|
|
|
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);
|
|
|
|
|
2016-06-09 03:57:14 +00:00
|
|
|
@@ -459,7 +459,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
2016-03-26 08:38:02 +00:00
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2016-08-27 23:41:58 +00:00
|
|
|
2.9.2.windows.1
|
2016-03-26 08:38:02 +00:00
|
|
|
|