-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
4426-Spigot-aa7842e-8da2a0a (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
-
Yes
If a plugin cancels the EntityTransformEvent event, the StrayConversionTime nbt will not reset.
How to reproduce:
- Run a test plugin with the following code:
@EventHandler public void onEliteTransform(EntityTransformEvent event) { Bukkit.getLogger().info("Cancelled EntityTransformEvent"); event.setCancelled(true); }
- Spawn a skeleton in Powder Snow block (make sure the skeleton cannot move).
- Run this command to speed up the conversion:
/data merge entity @e[type=minecraft:skeleton,sort=nearest,limit=1] {StrayConversionTime:10}
- Keep checking the StrayConversionTime nbt with this command:
/data get entity @e[type=skeleton,sort=nearest,limit=1] StrayConversionTime
Observed Results:
The StrayConversionTime nbt is not resetting. This causes the Skeleton to spam entity.skeleton.converted_to_stray sound and EntityTransformEvent (look in the console "Cancelled EntityTransformEvent").
Expected Results:
The StrayConversionTime nbt is reset properly to match Zombies with DrownedConversionTime nbt. Command to test Zombies when their heads are in water:
/data get entity @e[type=zombie,sort=nearest,limit=1] DrownedConversionTime