[MC-2958] Custom mobs and normal Vexes drop equipped items with looting despite DropChances set to 0 Created: 14/Nov/12 Updated: 06/Sep/19 Resolved: 06/Sep/19 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.4, Minecraft 1.8.4, Minecraft 1.8.7, Minecraft 1.8.9, Minecraft 16w05b, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 1.11, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 18w03b, Minecraft 1.13-pre1, Minecraft 1.13.1, 1.14.4 |
| Fix Version/s: | 19w37a |
| Type: | Bug | ||
| Reporter: | Marcono1234 | Assignee: | [Mojang] Bartosz Bok |
| Resolution: | Fixed | Votes: | 13 |
| Labels: | DropChances, equipment, mob | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| CHK: | |||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||
| Category: |
Entities
|
||||||||||||||||
| Description |
|
I'm playing around with custom spawners for a combat arena in an adventure map. I noticed that my mobs drop items they have equipped, even if their respective drop chance is set to 0. I've added the schematics file for a mob spawner, of which the mobs are affected by this issue. Other info:
Mob command /summon bat ~ ~1 ~ {NoAI:1b,ArmorItems:[{id:"stone",Count:1b},{id:"dirt",Count:1b},{id:"grass_block",Count:1b},{id:"glass",Count:1b}],HandItems:[{id:"white_wool",Count:1b},{}],ArmorDropChances:[0f,0f,0f,0f],HandDropChances:[0f,0f]}
Looting command /give @p minecraft:stick{Enchantments:[{id:sharpness,lvl:32767},{id:looting,lvl:32767}]}
Code analysis by marcono1234 can be found in this comment. As of 1.11, this affects Vex swords, since they have a HandDropChance of 0 on the mainhand. |
| Comments |
| Comment by Jeuv [ 02/Aug/19 ] |
|
Still in 1.14.4, just had 2 swords drop from vexes. |
| Comment by SunCat [ 08/Jun/16 ] |
|
Still in 1.10 |
| Comment by user-f2760 (Inactive) [ 03/Apr/16 ] |
|
changed reported to marcono1234 since the original reporter, thoronwen was no longer active |
| Comment by Marcono1234 [ 13/Mar/16 ] |
|
Please link to this comment in the description The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version. The reason why this happens is because the method net.minecraft.entity.EntityLiving.dropEquipment(boolean, int) is only testing if this.rand.nextFloat() - (float)lootingModifier * 0.01F) < d0 (d0 being the drop chance). This means if the looting enchantment is 100 or higher, items will be dropped. Edit: As said in |
| Comment by SunCat [ 12/Mar/16 ] |
|
Still in 1.9.1-pre3 |
| Comment by SunCat [ 09/Mar/16 ] |
|
Still in 1.9.1-pre1 |
| Comment by SunCat [ 05/Mar/16 ] |
|
Confirmed for 1.9 |
| Comment by Marcono1234 [ 05/Feb/16 ] |
|
Confirmed for
Please add these commands Mob command /summon Bat ~ ~1 ~ {NoAI:1b,ArmorItems:[{id:"stone",Count:1b},{id:"dirt",Count:1b},{id:"grass",Count:1b},{id:"glass",Count:1b}],HandItems:[{id:"wool",Count:1b},{}],ArmorDropChances:[0f,0f,0f,0f],HandDropChances:[0f,0f]}
Looting command /give @p stick 1 0 {ench:[{id:16,lvl:32767},{id:21,lvl:32767}]}
|
| Comment by Marcono1234 [ 07/May/15 ] |
|
Confirmed for
Used commands /summon Bat ~ ~1 ~ {NoAI:1,Equipment:[{id:stone,Count:1},{id:dirt,Count:1},{id:grass,Count:1},{id:glass,Count:1},{id:wool,Count:1}],DropChances:[0f,0f,0f,0f,0f]}
/give @p stick 1 0 {ench:[{id:16,lvl:32767},{id:21,lvl:32767}]}
|
| Comment by Kumasasa [ 14/Jul/13 ] |
|
No answer, assuming no longer an issue. |
| Comment by Tails [ 19/Feb/13 ] |
|
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by mrpingouin1 [ 17/Dec/12 ] |
|
It may happen with a looting enchantment : |