2021-06-14 15:45:16 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sun, 23 Aug 2020 15:28:35 +0200
|
|
|
|
Subject: [PATCH] Add more Evoker API
|
|
|
|
|
2022-11-20 00:53:20 +01:00
|
|
|
== 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;
|
2021-06-14 15:45:16 +02:00
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
2023-08-14 01:32:51 +02:00
|
|
|
index 93ffe2ac37b03aa289881f5f12c7aa7f1d835eda..b66dd5c5c5d98c9285e0d0a4ad4b99a66419f732 100644
|
2021-06-14 15:45:16 +02:00
|
|
|
--- 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;
|
2023-08-14 01:32:51 +02:00
|
|
|
import org.bukkit.entity.Evoker;
|
|
|
|
@@ -29,4 +30,17 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker {
|
2021-06-14 15:45:16 +02:00
|
|
|
public void setCurrentSpell(Evoker.Spell spell) {
|
|
|
|
this.getHandle().setIsCastingSpell(spell == null ? SpellcasterIllager.IllagerSpell.NONE : SpellcasterIllager.IllagerSpell.byId(spell.ordinal()));
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @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
|
|
|
|
}
|