diff options
author | Kyle Wood <[email protected]> | 2021-04-24 17:01:33 -0500 |
---|---|---|
committer | Kyle Wood <[email protected]> | 2021-04-25 18:37:43 -0500 |
commit | 3093b81fee3064603c368ab934eddf66ce304433 (patch) | |
tree | cb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch | |
parent | 1af696a05d21cbdd7b5a7170f95598c013257588 (diff) | |
download | Paper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz Paper-3093b81fee3064603c368ab934eddf66ce304433.zip |
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch')
-rw-r--r-- | Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch b/Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch new file mode 100644 index 0000000000..c70d5e9bb3 --- /dev/null +++ b/Spigot-Server-Patches-Unmapped/0235-Vex-getSummoner-API.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Wed, 4 Jul 2018 15:30:22 -0400 +Subject: [PATCH] Vex#getSummoner API + +Get's the NPC that summoned this Vex + +diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java +index 3acf36a500424808cd91dc607df1ffbe23720c16..3b74ade60b3b0ae0e908866cb4ac11acd75620ff 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java ++++ b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java +@@ -124,6 +124,7 @@ public class EntityVex extends EntityMonster { + + } + ++ public EntityInsentient getOwner() { return eK(); } // Paper - OBFHELPER + public EntityInsentient eK() { + return this.c; + } +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +index ccaccffbf5eb18108760d1da09c4c1b2f33ebc42..962d6017f6acc47ebe4b754ccd9b97a1fc97cc58 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java +@@ -16,6 +16,13 @@ public class CraftVex extends CraftMonster implements Vex { + return (EntityVex) super.getHandle(); + } + ++ // Paper start ++ public org.bukkit.entity.Mob getSummoner() { ++ net.minecraft.world.entity.EntityInsentient owner = getHandle().getOwner(); ++ return owner != null ? (org.bukkit.entity.Mob) owner.getBukkitEntity() : null; ++ } ++ // Paper end ++ + @Override + public String toString() { + return "CraftVex"; |