-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
Windows 10 (21H1 - OS Build 19043.1083)
AdoptOpenJDK-16.0.1+9
-
CraftBukkit version 3198-Spigot-18c71bf-0abf420 (MC: 1.17.1)
-
Yes
Mooshrooms do not fire the EntityDropItemEvent when sheared and turned into cows even though they always drop 5 mushrooms.
To reproduce:
- Create and run a plugin that listens to the EntityDropItemEvent and prints out the entity type and item type dropped. Example code can be found at the bottom of this issue.
- Spawn a Mooshroom using a spawn egg.
- Grab some shears and right click on the Mooshroom.
- 5 mushrooms will drop and no events will be fired.
Time to reproduce: Less than a minute.
Expected result: The EntityDropItemEvent is fired 5 times, once for each item dropped. This would match the behavior when shearing sheep (firing the event between 1 and 3 times depending on the wool amount dropped). It would probably make most sense for the entity in the event to be the Mooshroom rather than the newly spawned cow, but either would work.
Example code to view issue:
@EventHandler public void onEntityDropItem(EntityDropItemEvent event) { Bukkit.broadcastMessage(event.getEntityType() + " dropped " + event.getItemDrop().getItemStack().getType()); }