aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0423-Add-more-Evoker-API.patch
diff options
context:
space:
mode:
authormaxcom1 <[email protected]>2024-03-23 22:26:17 +0100
committerGitHub <[email protected]>2024-03-23 17:26:17 -0400
commitb6001403e9703cadaa6e8c8558e732b91c3c6d6e (patch)
treea8c57bbc334a8ad48d4ad2b43db335667b142bee /patches/server/0423-Add-more-Evoker-API.patch
parent9ec7dfcbc41c6e625de0050b6997160a75df9f44 (diff)
downloadPaper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.tar.gz
Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.zip
Add methods to change entity physics (#10334)
Diffstat (limited to 'patches/server/0423-Add-more-Evoker-API.patch')
-rw-r--r--patches/server/0423-Add-more-Evoker-API.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/server/0423-Add-more-Evoker-API.patch b/patches/server/0423-Add-more-Evoker-API.patch
new file mode 100644
index 0000000000..f44eceff55
--- /dev/null
+++ b/patches/server/0423-Add-more-Evoker-API.patch
@@ -0,0 +1,38 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: BillyGalbreath <[email protected]>
+Date: Sun, 23 Aug 2020 15:28:35 +0200
+Subject: [PATCH] Add more Evoker API
+
+== AT ==
+public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
+public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
+index 93ffe2ac37b03aa289881f5f12c7aa7f1d835eda..3a890cccf1766758794f3a3b5d31428f42590049 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
+@@ -1,5 +1,6 @@
+ package org.bukkit.craftbukkit.entity;
+
++import net.minecraft.world.entity.animal.Sheep;
+ import net.minecraft.world.entity.monster.SpellcasterIllager;
+ import org.bukkit.craftbukkit.CraftServer;
+ import org.bukkit.entity.Evoker;
+@@ -29,4 +30,17 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker {
+ public void setCurrentSpell(Evoker.Spell spell) {
+ this.getHandle().setIsCastingSpell(spell == null ? SpellcasterIllager.IllagerSpell.NONE : SpellcasterIllager.IllagerSpell.byId(spell.ordinal()));
+ }
++
++ // Paper start - Add more Evoker API
++ @Override
++ public org.bukkit.entity.Sheep getWololoTarget() {
++ Sheep sheep = getHandle().getWololoTarget();
++ return sheep == null ? null : (org.bukkit.entity.Sheep) sheep.getBukkitEntity();
++ }
++
++ @Override
++ public void setWololoTarget(org.bukkit.entity.Sheep sheep) {
++ getHandle().setWololoTarget(sheep == null ? null : ((org.bukkit.craftbukkit.entity.CraftSheep) sheep).getHandle());
++ }
++ // Paper end - Add more Evoker API
+ }