2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/monster/EntityShulker.java
|
|
|
|
+++ b/net/minecraft/world/entity/monster/EntityShulker.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -57,6 +57,12 @@
|
2021-03-15 23:00:00 +01:00
|
|
|
import net.minecraft.world.phys.AxisAlignedBB;
|
|
|
|
import net.minecraft.world.phys.Vec3D;
|
2021-03-08 22:47:33 +01:00
|
|
|
|
2017-02-19 23:55:24 +01:00
|
|
|
+// CraftBukkit start
|
2021-03-15 23:00:00 +01:00
|
|
|
+import net.minecraft.server.level.WorldServer;
|
2017-02-19 23:55:24 +01:00
|
|
|
+import org.bukkit.Location;
|
|
|
|
+import org.bukkit.event.entity.EntityTeleportEvent;
|
|
|
|
+// CraftBukkit end
|
2021-03-08 22:47:33 +01:00
|
|
|
+
|
2017-02-19 23:55:24 +01:00
|
|
|
public class EntityShulker extends EntityGolem implements IMonster {
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
private static final UUID COVERED_ARMOR_MODIFIER_UUID = UUID.fromString("7E0292F2-9434-48D5-A29F-9583AF7DF27F");
|
|
|
|
@@ -95,7 +101,7 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
this.goalSelector.a(4, new EntityShulker.a());
|
2021-06-11 07:00:00 +02:00
|
|
|
this.goalSelector.a(7, new EntityShulker.f());
|
2019-04-23 04:00:00 +02:00
|
|
|
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
2021-06-11 07:00:00 +02:00
|
|
|
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{this.getClass()})).a());
|
|
|
|
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{this.getClass()})).a(new Class[0])); // CraftBukkit - decompile error
|
|
|
|
this.targetSelector.a(2, new EntityShulker.e(this));
|
2019-04-23 04:00:00 +02:00
|
|
|
this.targetSelector.a(3, new EntityShulker.c(this));
|
|
|
|
}
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -405,6 +411,16 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
EnumDirection enumdirection = this.g(blockposition1);
|
2017-02-19 23:55:24 +01:00
|
|
|
|
2020-06-25 02:00:00 +02:00
|
|
|
if (enumdirection != null) {
|
|
|
|
+ // CraftBukkit start
|
2021-06-11 07:00:00 +02:00
|
|
|
+ EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), this.getBukkitEntity().getLocation(), new Location(this.level.getWorld(), blockposition1.getX(), blockposition1.getY(), blockposition1.getZ()));
|
2021-06-11 13:33:49 +02:00
|
|
|
+ this.level.getCraftServer().getPluginManager().callEvent(teleport);
|
2020-06-25 02:00:00 +02:00
|
|
|
+ if (!teleport.isCancelled()) {
|
|
|
|
+ Location to = teleport.getTo();
|
|
|
|
+ blockposition1 = new BlockPosition(to.getX(), to.getY(), to.getZ());
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2021-06-11 07:00:00 +02:00
|
|
|
this.decouple();
|
|
|
|
this.setAttachFace(enumdirection);
|
|
|
|
this.playSound(SoundEffects.SHULKER_TELEPORT, 1.0F, 1.0F);
|
|
|
|
@@ -477,7 +493,7 @@
|
2019-12-10 23:00:00 +01:00
|
|
|
}
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
entityshulker.d(vec3d);
|
|
|
|
- this.level.addEntity(entityshulker);
|
|
|
|
+ this.level.addEntity(entityshulker, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - the mysteries of life
|
2019-12-10 23:00:00 +01:00
|
|
|
}
|
|
|
|
}
|
2021-06-11 07:00:00 +02:00
|
|
|
}
|