mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
By: md_5 <git@md-5.net>
This commit is contained in:
parent
9c5dd3b837
commit
00c0964347
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue