parent
3fa9c0b5c3
commit
0db94d4fca
|
@ -1,4 +1,4 @@
|
||||||
From 1d1165741a3b4814b84517f53a18d5e46bb1845a Mon Sep 17 00:00:00 2001
|
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sat, 6 Oct 2018 20:54:23 -0500
|
Date: Sat, 6 Oct 2018 20:54:23 -0500
|
||||||
Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
index f596b435..67b29c55 100644
|
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -410,20 +410,22 @@ public class EntityItem extends Entity {
|
@@ -410,20 +410,22 @@ public class EntityItem extends Entity {
|
||||||
|
@ -37,7 +37,7 @@ index f596b435..67b29c55 100644
|
||||||
this.f = uuid;
|
this.f = uuid;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||||
index 1df17f09..3da71da5 100644
|
index 7ac07ac07ac0..7ac07ac07ac0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||||
@@ -9,6 +9,11 @@ import org.bukkit.inventory.ItemStack;
|
@@ -9,6 +9,11 @@ import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -52,41 +52,27 @@ index 1df17f09..3da71da5 100644
|
||||||
public class CraftItem extends CraftEntity implements Item {
|
public class CraftItem extends CraftEntity implements Item {
|
||||||
private final EntityItem item;
|
private final EntityItem item;
|
||||||
|
|
||||||
@@ -21,6 +26,13 @@ public class CraftItem extends CraftEntity implements Item {
|
@@ -45,6 +50,24 @@ public class CraftItem extends CraftEntity implements Item {
|
||||||
this(server, entity, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Paper start
|
|
||||||
+ @Override
|
|
||||||
+ public EntityItem getHandle() {
|
|
||||||
+ return (EntityItem) entity;
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
|
||||||
+
|
|
||||||
public ItemStack getItemStack() {
|
|
||||||
return CraftItemStack.asCraftMirror(item.getItemStack());
|
|
||||||
}
|
|
||||||
@@ -45,6 +57,24 @@ public class CraftItem extends CraftEntity implements Item {
|
|
||||||
public void setCanMobPickup(boolean canMobPickup) {
|
public void setCanMobPickup(boolean canMobPickup) {
|
||||||
item.canMobPickup = canMobPickup;
|
item.canMobPickup = canMobPickup;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public UUID getOwner() {
|
+ public UUID getOwner() {
|
||||||
+ return getHandle().getOwner();
|
+ return item.getOwner();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void setOwner(@Nullable UUID owner) {
|
+ public void setOwner(@Nullable UUID owner) {
|
||||||
+ getHandle().setOwner(owner);
|
+ item.setOwner(owner);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ public UUID getThrower() {
|
+ public UUID getThrower() {
|
||||||
+ return getHandle().getThrower();
|
+ return item.getThrower();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void setThrower(@Nullable UUID thrower) {
|
+ public void setThrower(@Nullable UUID thrower) {
|
||||||
+ getHandle().setThrower(thrower);
|
+ item.setThrower(thrower);
|
||||||
+ }
|
+ }
|
||||||
// Paper End
|
// Paper End
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue