[SPIGOT-6669] Shearing a Mooshroom does not fire EntityDropItemEvent Created: 23/Jul/21 Updated: 23/Jul/21 Resolved: 23/Jul/21 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Esophose | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | 1.17.1, EntityDropItemEvent, mooshroom, shearing | ||
Environment: |
Windows 10 (21H1 - OS Build 19043.1083) AdoptOpenJDK-16.0.1+9 |
Version: | CraftBukkit version 3198-Spigot-18c71bf-0abf420 (MC: 1.17.1) |
Guidelines Read: | Yes |
Description |
Mooshrooms do not fire the EntityDropItemEvent when sheared and turned into cows even though they always drop 5 mushrooms. To reproduce:
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()); } |