-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.14, 1.15.2, 20w15a, 1.16 Release Candidate 1, 1.16, 1.16.5, 21w18a, 1.19.2, 1.19.3, 1.19.4 Release Candidate 2, 1.19.4, 1.20.4, 24w07a, 24w12a, 1.21.1, 24w34a, 24w37a
-
Confirmed
-
Loot tables
-
Normal
-
Platform
The wither boss' loot table is not changed when its DeathLootTable NBT data is modified, resulting in it always dropping a nether star.
Steps to Reproduce:
- Summon a wither with no AI
/summon minecraft:wither ~ ~ ~ {NoAI:1b}
- Modify its data to be empty
/data modify entity @e[type=wither,limit=1,sort=nearest] DeathLootTable set value ""
- Kill it
/kill @e[type=wither]
Expected & Observed Results:
- The wither will drop a nether star, despite having no DeathLootTable NBT data
- It would not drop anything, as that is what the player intentionally set the DeathLootTable to.
Screenshots/Videos:
WitherBossDeathLootTable.mp4
Code Analysis
The happens because the wither boss has its death loot table "hard-coded", meaning it ignores any loot table entirely.
Class: net.minecraft.world.entity.boss.wither.WitherBoss // Method: dropCustomDeathLoot // MCP 1.20.2 Mojang Mappings
protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) { super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops); ItemEntity itementity = this.spawnAtLocation(Items.NETHER_STAR); if (itementity != null) { itementity.setExtendedLifetime(); } }
Original Description:
The bug
Setting the wither's DeathLootTable NBT tag to any given loot table does not stop the wither from dropping a nether star.
Loot from the loot table set in the DeathLootTable tag drops in addition to the nether star. This was not the case in 1.13.*, where the DeathLootTable tag being set prevented the nether star from dropping.
- is duplicated by
-
MC-226249 Withers drop stars, even with empty loot table
- Resolved
-
MC-276758 Wither's nether star drop is hardcoded
- Resolved
- relates to
-
MC-161191 Falling Block entity does not evaluate block loot table when being broken
- Open
-
MC-164171 When the player is killed by the wither skull, the player's inventory drop will be deleted
- Open
-
MC-75494 Lead item drop is not affected by doEntityDrops gamerule
- Resolved
-
MC-109344 There is no wither loot table
- Resolved
-
MC-267866 Panda slimeball drop is hardcoded
- Resolved
-
MC-269873 Egg laying drop from chickens is hardcoded
- Resolved
-
MC-269874 Sticks and planks dropping from boat entities breaking is hardcoded
- Resolved
-
MC-273941 Scute drop from turtles appears to be hardcoded
- Resolved
-
MC-273942 Scute drop from armadillos appears to be hardcoded
- Resolved
-
MC-273943 Sweet berries drop from harvested bushes is hardcoded
- Resolved
-
MC-273944 Items removed from flower pots may be hardcoded
- Resolved
-
MC-276634 Item dropped when using bone meal on sunflowers, peonies, lilacs or rose bushes appears to be hardcoded
- Open
-
MC-94610 Missing loot table entries for mob heads from charged creepers
- Reopened