From c949675e1fc50557752110f12e2281c1105da667 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 22 Aug 2021 18:07:31 +1000 Subject: [PATCH] SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn --- .../net/minecraft/world/entity/monster/EntitySlime.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch b/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch index b5318e3f2..45066a8d7 100644 --- a/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch +++ b/nms-patches/net/minecraft/world/entity/monster/EntitySlime.patch @@ -44,7 +44,7 @@ for (int l = 0; l < k; ++l) { float f1 = ((float) (l % 2) - 0.5F) * f; float f2 = ((float) (l / 2) - 0.5F) * f; -@@ -214,8 +235,17 @@ +@@ -214,8 +235,18 @@ entityslime.setInvulnerable(this.isInvulnerable()); entityslime.setSize(j, true); entityslime.setPositionRotation(this.locX() + (double) f1, this.locY() + 0.5D, this.locZ() + (double) f2, this.random.nextFloat() * 360.0F, 0.0F); @@ -54,6 +54,7 @@ + + // CraftBukkit start + if (CraftEventFactory.callEntityTransformEvent(this, slimes, EntityTransformEvent.TransformReason.SPLIT).isCancelled()) { ++ super.a(entity_removalreason); + return; + } + for (EntityLiving living : slimes) {