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
|
|
|
|
|
|
|
|
|
2021-06-14 16:41:34 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
|
|
|
index 2b09a864425160fadd05323006ddab0bab1d47c8..0400ced70839947532b90f546360701729244a73 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
|
|
|
|
@@ -125,12 +125,12 @@ public class Evoker extends SpellcasterIllager {
|
|
|
|
return SoundEvents.EVOKER_HURT;
|
|
|
|
}
|
|
|
|
|
|
|
|
- void setWololoTarget(@Nullable Sheep sheep) {
|
|
|
|
+ public void setWololoTarget(@Nullable Sheep sheep) { // Paper - make public
|
|
|
|
this.wololoTarget = sheep;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
- Sheep getWololoTarget() {
|
|
|
|
+ public Sheep getWololoTarget() { // Paper - make public
|
|
|
|
return this.wololoTarget;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
index 91d07e6996e315734689ea25336992b0ed21cf25..7e861636710aa44ed36e7f20c6320dabb809c35d 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.EntityType;
|
|
|
|
@@ -35,4 +36,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
|
|
|
|
+ @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
|
|
|
|
}
|