Cured zombie villagers don't drop picked up items
The bug
A zombie villager picked up items dropped by a fellow player, specifically armor. The villager had been cured, and the armour was lost.
How to reproduce
- Summon a zombie villager that can pick up items
/summon minecraft:zombie_villager ~ ~ ~ {CanPickUpLoot:1b} - Give an item to the zombie villager
- Cure the zombie villager (command below for alternative, faster method)
/data merge entity @e[type=zombie_villager,limit=1,sort=nearest] {ConversionTime:1}→
Notice the items are gone
The fix
Call the method EntityLiving.dropEquipment(wasRecentlyHit, lootingModifier) in EntityZombieVillager.finishConversion().
Linked Issues
is duplicated by6
relates to4
- Fixed
[Mod] CubeTheThird
Maria Lemón- 28
- 8
- Confirmed
Important
- Mob behaviour
- Survival
- armor cure drop item villager zombie_villager
1.4.5 - 1.14.4
1.4.5 1.4.6 1.4.7 13w01a 13w01b 1.5 1.5.2 1.6.1 1.6.2 1.6.4 13w36a 13w36b 13w42a 13w42b 13w43a 1.7 1.7.1 1.7.2 1.7.3 1.7.4 14w02c 14w03b 14w04a 14w04b 1.7.10 14w30b 14w30c 1.8 1.8.1 1.8.2-pre1 1.8.2-pre2 1.8.8 15w44b 15w45a 15w47c 1.9 1.9.1-pre1 1.9.1-pre2 1.9.1-pre3 1.10.2 16w32a 16w32b 16w33a 16w35a 16w40a 16w41a 16w44a 1.11-pre1 1.11.2 1.12.2 18w14a 18w14b 1.13.1 1.13.2 18w48a 18w48b 18w49a 18w50a 19w11b 19w12b 1.14.4- 19w45a
Created Issue:
Cured zombie villagers don't drop picked up items
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.Environment
Windows 7, Linux, Java 7 Update 9
is duplicated by
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.From
MC-100014
- Summon a Zombie Villager with armor and/or weapons:
/summon Zombie ~ ~ ~ {IsVillager:1b,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:diamond_sword},{id:diamond_sword}]}- Throw a splash potion of weakness on it, and right-click on it with a regular golden apple (curing the Zombie Villager), and wait.
Alternate, faster method: /entitydata @e[type=Zombie,c=1] {ConversionTime:1}- When the zombie villager has been cured, the villager that comes forth out of it does not have any ArmorItems or HandItems NBTTagLists ({ArmorItems:[0:{},1:{},2:{},3:{}],HandItems:[0:{},1:{}]})
is duplicated by
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.From
MC-100014
- Summon a Zombie Villager with armor and/or weapons:
/summon Zombie ~ ~ ~ {IsVillager:1b,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:diamond_sword},{id:diamond_sword}]}- Throw a splash potion of weakness on it, and right-click on it with a regular golden apple (curing the Zombie Villager), and wait.
Alternate, faster method: /entitydata @e[type=Zombie,c=1] {ConversionTime:1}- When the zombie villager has been cured, the villager that comes forth out of it does not have any ArmorItems or HandItems NBTTagLists ({ArmorItems:[0:{},1:{},2:{},3:{}],HandItems:[0:{},1:{}]})
Fix:
EntityZombie.java (MCP)protected void convertToVillager() { EntityVillager entityvillager = new EntityVillager(this.worldObj); entityvillager.setItemStackToSlot(EntityEquipmentSlot.HEAD, this.getItemStackFromSlot(EntityEquipmentSlot.HEAD)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.CHEST, this.getItemStackFromSlot(EntityEquipmentSlot.CHEST)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.LEGS, this.getItemStackFromSlot(EntityEquipmentSlot.LEGS)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.FEET, this.getItemStackFromSlot(EntityEquipmentSlot.FEET)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, this.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.OFFHAND, this.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND)); entityvillager.setDropChance(EntityEquipmentSlot.FEET, this.inventoryArmorDropChances[0]); entityvillager.setDropChance(EntityEquipmentSlot.LEGS, this.inventoryArmorDropChances[1]); entityvillager.setDropChance(EntityEquipmentSlot.CHEST, this.inventoryArmorDropChances[2]); entityvillager.setDropChance(EntityEquipmentSlot.HEAD, this.inventoryArmorDropChances[3]); entityvillager.setDropChance(EntityEquipmentSlot.MAINHAND, this.inventoryHandsDropChances[0]); entityvillager.setDropChance(EntityEquipmentSlot.OFFHAND, this.inventoryHandsDropChances[1]); }
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.From
MC-100014
- Summon a Zombie Villager with armor and/or weapons:
/summon Zombie ~ ~ ~ {IsVillager:1b,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:diamond_sword},{id:diamond_sword}]}- Throw a splash potion of weakness on it, and right-click on it with a regular golden apple (curing the Zombie Villager), and wait.
Alternate, faster method: /entitydata @e[type=Zombie,c=1] {ConversionTime:1}- When the zombie villager has been cured, the villager that comes forth out of it does not have any ArmorItems or HandItems NBTTagLists ({ArmorItems:[0:{},1:{},2:{},3:{}],HandItems:[0:{},1:{}]})
Fix:
EntityZombie.java (MCP)protected voidconvertToVillager() { EntityVillager entityvillager =newEntityVillager(this.worldObj); entityvillager.setItemStackToSlot(EntityEquipmentSlot.HEAD,this.getItemStackFromSlot(EntityEquipmentSlot.HEAD)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.CHEST,this.getItemStackFromSlot(EntityEquipmentSlot.CHEST)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.LEGS,this.getItemStackFromSlot(EntityEquipmentSlot.LEGS)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.FEET,this.getItemStackFromSlot(EntityEquipmentSlot.FEET)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.MAINHAND,this.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND)); entityvillager.setItemStackToSlot(EntityEquipmentSlot.OFFHAND,this.getItemStackFromSlot(EntityEquipmentSlot.OFFHAND)); entityvillager.setDropChance(EntityEquipmentSlot.FEET, this.inventoryArmorDropChances[0]); entityvillager.setDropChance(EntityEquipmentSlot.LEGS,this.inventoryArmorDropChances[1]); entityvillager.setDropChance(EntityEquipmentSlot.CHEST,this.inventoryArmorDropChances[2]); entityvillager.setDropChance(EntityEquipmentSlot.HEAD,this.inventoryArmorDropChances[3]); entityvillager.setDropChance(EntityEquipmentSlot.MAINHAND,this.inventoryHandsDropChances[0]); entityvillager.setDropChance(EntityEquipmentSlot.OFFHAND,this.inventoryHandsDropChances[1]); }A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.From
MC-100014
- Summon a Zombie Villager with armor and/or weapons:
/summon Zombie ~ ~ ~ {IsVillager:1b,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:diamond_sword},{id:diamond_sword}]}- Throw a splash potion of weakness on it, and right-click on it with a regular golden apple (curing the Zombie Villager), and wait.
Alternate, faster method: /entitydata @e[type=Zombie,c=1] {ConversionTime:1}- When the zombie villager has been cured, the villager that comes forth out of it does not have any ArmorItems or HandItems NBTTagLists ({ArmorItems:[0:{},1:{},2:{},3:{}],HandItems:[0:{},1:{}]})
Fix:
EntityZombieVillager.java (MCP)protected void finishConversion() { for (EntityEquipmentSlot entityequipmentslot : EntityEquipmentSlot.values()) { ItemStack itemstack = this.getItemStackFromSlot(entityequipmentslot); double chance; switch (entityequipmentslot.getSlotType()) { case HAND: chance = this.inventoryHandsDropChances[entityequipmentslot.getIndex()]; break; case ARMOR: chance = this.inventoryArmorDropChances[entityequipmentslot.getIndex()]; break; default: chance = 0.0D; } if (!itemstack.isEmpty() && chance == 2.0D) { EntityItem entityitem = new EntityItem(this.world, this.posX, this.posY, this.posZ, itemstack); entityitem.setDefaultPickupDelay(); this.world.spawnEntity(entityitem); } } //... }
is duplicated by
relates to
relates to
is duplicated by
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
What I expected to happen was...:
Once zombie villager is cured, picked up items are dropped.What actually happened was...:
Items picked up by zombie villager disappear upon curing.Steps to Reproduce:
1. Find/spawn a zombie villager capable of picking up items.
2. Give items to zombie villager.
3. Cure zombie villager, and notice missing items.From
MC-100014
- Summon a Zombie Villager with armor and/or weapons:
/summon Zombie ~ ~ ~ {IsVillager:1b,ArmorItems:[{id:diamond_boots},{id:diamond_leggings},{id:diamond_chestplate},{id:diamond_helmet}],HandItems:[{id:diamond_sword},{id:diamond_sword}]}- Throw a splash potion of weakness on it, and right-click on it with a regular golden apple (curing the Zombie Villager), and wait.
Alternate, faster method: /entitydata @e[type=Zombie,c=1] {ConversionTime:1}- When the zombie villager has been cured, the villager that comes forth out of it does not have any ArmorItems or HandItems NBTTagLists ({ArmorItems:[0:{},1:{},2:{},3:{}],HandItems:[0:{},1:{}]})
Fix:
EntityZombieVillager.java (MCP)protected void finishConversion() { for (EntityEquipmentSlot entityequipmentslot : EntityEquipmentSlot.values()) { ItemStack itemstack = this.getItemStackFromSlot(entityequipmentslot); double chance; switch (entityequipmentslot.getSlotType()) { case HAND: chance = this.inventoryHandsDropChances[entityequipmentslot.getIndex()]; break; case ARMOR: chance = this.inventoryArmorDropChances[entityequipmentslot.getIndex()]; break; default: chance = 0.0D; } if (!itemstack.isEmpty() && chance == 2.0D) { EntityItem entityitem = new EntityItem(this.world, this.posX, this.posY, this.posZ, itemstack); entityitem.setDefaultPickupDelay(); this.world.spawnEntity(entityitem); } } //... }The bug
A zombie villager picked up items dropped by a fellow player, specifically armour. The villager had been cured, and the armour was lost.
Steps to reproduce
- Summon a zombie villager that can pick up items
/summon minecraft:zombie_villager ~ ~ ~ {CanPickUpLoot:1b}- Give an item to the zombie villager
- Cure the zombie villager (command below for alternative, faster method)
/data merge entity @e[type=zombie_villager,limit=1,sort=nearest] {ConversionTime:1}→ Notice the items are gone
Fix
Call the method EntityLiving.dropEquipment(wasRecentlyHit, lootingModifier) in EntityZombieVillager.finishConversion().
The bug
A zombie villager picked up items dropped by a fellow player, specifically armo
ur. The villager had been cured, and the armour was lost.
Stepsto reproduce
- Summon a zombie villager that can pick up items
/summon minecraft:zombie_villager ~ ~ ~ {CanPickUpLoot:1b}- Give an item to the zombie villager
- Cure the zombie villager (command below for alternative, faster method)
/data merge entity @e[type=zombie_villager,limit=1,sort=nearest] {ConversionTime:1}→ Notice the items are gone
FixCall the method EntityLiving.dropEquipment(wasRecentlyHit, lootingModifier) in EntityZombieVillager.finishConversion().
The bug
A zombie villager picked up items dropped by a fellow player, specifically armor. The villager had been cured, and the armour was lost.
How to reproduce
- Summon a zombie villager that can pick up items
/summon minecraft:zombie_villager ~ ~ ~ {CanPickUpLoot:1b}- Give an item to the zombie villager
- Cure the zombie villager (command below for alternative, faster method)
/data merge entity @e[type=zombie_villager,limit=1,sort=nearest] {ConversionTime:1}→
Notice the items are gone
The fix
Call the method EntityLiving.dropEquipment(wasRecentlyHit, lootingModifier) in EntityZombieVillager.finishConversion().
Windows 7, Linux, Java 7 Update 9
is duplicated by
is duplicated by
relates to
relates to
Duplicate of MC-3591, please use the search function to see if your bug has already been submitted. Currently over 42% of tickets are being closed as duplicate.
Zombie villagers can pick up items. When cured, they don't drop them. This was fixed in java. (MC-3591)
Confirmed.
The same thing happened to me just now. (but I did it as a test not by accident) then when i was going to report it, i saw that you already have.
I was able to reproduce this by both accidnet and then again I watched the zombie change and the item disappeared.
Confirmed for 1.13.1.
It happened to me in 1.15.1
Same issue in 1.16.1
If this issue continues to occur, please create a new ticket, and we will link it to this one.