-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplication of dropped items on mob death.
* The EntityDeathEvent handler contains a work-around for a vanilla Minecraft bug wherein mob equipment with a drop chance of 100% does not always drop. * Prior to Bukkit commit d611cff, the EntityDeathEvent did not include mob equipment in the list of drops, so it was safe for Doppelganger to simply strip the mob of its gear and add those items to the drops. * In newer versions of Bukkit, the equipment is present in the drops and is also still on the mob itself, so the Doppelganger work-around code leads to duplicate items in the drops. This commit avoids adding equipment to the drops when an identical item is already present in the dropped item list. * This fix works for older Bukkit versions as well. * As described at Bukkit/CraftBukkit@fb58cc9 the new Bukkit item dropping code is still reliant on vanilla code to drop items and that vanilla code still sometimes fails to drop items even though the drop probability is 100%. The work-around code still corrects that issue.
- Loading branch information
Showing
2 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters