2020-08-23 15:29:02 +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-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java b/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
|
2020-08-23 15:29:02 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityEvoker.java
|
|
|
|
@@ -0,0 +0,0 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
2020-08-23 15:29:02 +02:00
|
|
|
|
|
|
|
public class EntityEvoker extends EntityIllagerWizard {
|
|
|
|
|
|
|
|
- private EntitySheep bo;
|
|
|
|
+ private EntitySheep bo; public final EntitySheep getWololoTarget() { return this.bo; } public final void setWololoTarget(EntitySheep sheep) { this.bo = sheep; } // Paper - OBFHELPER
|
|
|
|
|
|
|
|
public EntityEvoker(EntityTypes<? extends EntityEvoker> entitytypes, World world) {
|
|
|
|
super(entitytypes, world);
|
|
|
|
@@ -0,0 +0,0 @@ public class EntityEvoker extends EntityIllagerWizard {
|
|
|
|
this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D));
|
|
|
|
this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F));
|
|
|
|
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
|
|
|
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a());
|
|
|
|
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Paper - decompile fix
|
|
|
|
this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300));
|
|
|
|
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300));
|
|
|
|
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, false));
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
|
2021-03-16 16:50:45 +01:00
|
|
|
@@ -0,0 +0,0 @@
|
|
|
|
package org.bukkit.craftbukkit.entity;
|
|
|
|
|
|
|
|
+import net.minecraft.world.entity.animal.EntitySheep;
|
|
|
|
import net.minecraft.world.entity.monster.EntityEvoker;
|
|
|
|
import net.minecraft.world.entity.monster.EntityIllagerWizard;
|
|
|
|
import org.bukkit.craftbukkit.CraftServer;
|
2020-08-23 15:29:02 +02:00
|
|
|
@@ -0,0 +0,0 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker {
|
|
|
|
public void setCurrentSpell(Evoker.Spell spell) {
|
|
|
|
getHandle().setSpell(spell == null ? EntityIllagerWizard.Spell.NONE : EntityIllagerWizard.Spell.a(spell.ordinal()));
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public org.bukkit.entity.Sheep getWololoTarget() {
|
2021-03-16 16:50:45 +01:00
|
|
|
+ EntitySheep sheep = getHandle().getWololoTarget();
|
2020-08-23 15:29:02 +02:00
|
|
|
+ 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
|
|
|
|
}
|