2019-03-24 22:12:56 +00:00
|
|
|
From 3b7348ab1fc8bd6b8918e0b6a4626ef178eb22aa Mon Sep 17 00:00:00 2001
|
2018-10-07 01:55:18 +00:00
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sat, 6 Oct 2018 20:54:23 -0500
|
|
|
|
Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
|
|
|
thrower
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
2019-03-24 22:12:56 +00:00
|
|
|
index c9473087a..e723bd339 100644
|
2018-10-07 01:55:18 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2019-03-24 22:12:56 +00:00
|
|
|
@@ -410,20 +410,22 @@ public class EntityItem extends Entity {
|
2019-01-28 22:14:04 +00:00
|
|
|
this.getDataWatcher().markDirty(EntityItem.b); // CraftBukkit - SPIGOT-4591, must mark dirty
|
2018-10-07 01:55:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- @Nullable
|
|
|
|
- public UUID k() {
|
|
|
|
+ @Nullable public UUID getOwner() { return k(); } // Paper - OBFHELPER
|
|
|
|
+ @Nullable public UUID k() { // Paper
|
|
|
|
return this.g;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public void setOwner(@Nullable UUID owner) { b(owner); } // Paper - OBFHELPER
|
|
|
|
public void b(@Nullable UUID uuid) {
|
|
|
|
this.g = uuid;
|
|
|
|
}
|
|
|
|
|
|
|
|
- @Nullable
|
|
|
|
- public UUID l() {
|
|
|
|
+ @Nullable public UUID getThrower() { return l(); } // Paper - OBFHELPER
|
|
|
|
+ @Nullable public UUID l() { // Paper
|
|
|
|
return this.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public void setThrower(@Nullable UUID thrower) { c(thrower); } // Paper - OBFHELPER
|
|
|
|
public void c(@Nullable UUID 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
|
2019-03-20 00:28:15 +00:00
|
|
|
index 6036592f7..4128ba4c0 100644
|
2018-10-07 01:55:18 +00:00
|
|
|
--- a/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;
|
|
|
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
|
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
|
|
|
|
|
|
+// Paper start
|
|
|
|
+import javax.annotation.Nullable;
|
|
|
|
+import java.util.UUID;
|
|
|
|
+// Paper end
|
|
|
|
+
|
|
|
|
public class CraftItem extends CraftEntity implements Item {
|
|
|
|
private final EntityItem item;
|
|
|
|
|
2019-01-01 03:15:55 +00:00
|
|
|
@@ -53,6 +58,24 @@ public class CraftItem extends CraftEntity implements Item {
|
2018-10-07 01:55:18 +00:00
|
|
|
public void setCanMobPickup(boolean canMobPickup) {
|
|
|
|
item.canMobPickup = canMobPickup;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Nullable
|
|
|
|
+ public UUID getOwner() {
|
2018-10-21 19:39:21 +00:00
|
|
|
+ return item.getOwner();
|
2018-10-07 01:55:18 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setOwner(@Nullable UUID owner) {
|
2018-10-21 19:39:21 +00:00
|
|
|
+ item.setOwner(owner);
|
2018-10-07 01:55:18 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Nullable
|
|
|
|
+ public UUID getThrower() {
|
2018-10-21 19:39:21 +00:00
|
|
|
+ return item.getThrower();
|
2018-10-07 01:55:18 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setThrower(@Nullable UUID thrower) {
|
2018-10-21 19:39:21 +00:00
|
|
|
+ item.setThrower(thrower);
|
2018-10-07 01:55:18 +00:00
|
|
|
+ }
|
|
|
|
// Paper End
|
|
|
|
|
|
|
|
@Override
|
|
|
|
--
|
2019-03-20 00:28:15 +00:00
|
|
|
2.21.0
|
2018-10-07 01:55:18 +00:00
|
|
|
|