Missing loot table entries for mob heads from charged creepers
Linked Issues
relates to11
The bug
Loot tables do not exist for some mobs or do not contain items that are dropped under certain circumstances.
Affected mobs
- Creeper: Music discs
- Witch: Potion (eventually invalid, see this comment)
- WitherBoss: Nether star
- Mob heads droped from mobs killed by charged creepers
The bug
Loot tables do not exist for some mobs or do not contain items that are dropped under certain circumstances.
Affected mobs
- Creeper: Music discs
- Witch: Potion (eventually invalid, see this comment)
- WitherBoss: Nether star
- Mob heads dropped from mobs killed by charged creepers
The bug
Loot tables do not
exist for some mobs or do notcontain items that are dropped under certain circumstances.Affected mobs
- Creeper: Music discs
- Witch: Potion (eventually invalid, see this comment)
- WitherBoss: Nether star
- Mob heads dropped from mobs killed by charged
creepersThe bug
Loot tables do not contain items that are dropped under certain circumstances.
Affected mobs
- Creeper: Music discs
- Witch: Potion (eventually invalid, see this comment)
- Mob heads dropped from mobs killed by charged
This requires additions to the loot table system to be fixed.
The bug
Loot tables do not contain items that are dropped under certain circumstances.
Affected mobs
- Creeper: Music discs
- Witch: Potion (eventually invalid, see this comment)
- Mob heads dropped from mobs killed by charged
This requires additions to the loot table system to be fixed.
Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w43a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.
When adding loot tables for slimes (regular, or magma), only size 4 seems to drop items...
Missing loot table entries for mob heads from charged creepers
relates to
relates to
relates to
Closely relates to the recently-fixed MC-267866 and also to: MC-94610 MC-149589 MC-173732 MC-177712 MC-202586 MC-235754 MC-235755
The bug
The dropping of honeycombs from a bee nest or beehive on which shears are used appears to be hardcoded.
How to fix
Introduce a loot table, as was done to fix MC-267866.
Eggs which chickens randomly lay are not controlled by a loot table, but instead are hardcoded. This issue was created due to the fix for MC-267866.
Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
public void aiStep() { . . . this.flap += this.flapping * 2.0F; if (!this.level().isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) { this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); -> ISSUE START this.spawnAtLocation(Items.EGG); -> ISSUE END this.gameEvent(GameEvent.ENTITY_PLACE); this.eggTime = this.random.nextInt(6000) + 6000; } . . . }
Suggested Fix
Introduce a loot table for eggs dropping from chickens.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875
The sticks and planks dropped from a boat breaking is not controlled by a loot table, but instead is hardcoded. This issue was created due to the recent fix for MC-267866.
Steps to Reproduce:
Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.
Code analysis:
protected void checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_) { . . . this.causeFallDamage(this.fallDistance, 1.0F, this.damageSources().fall()); if (!this.level().isClientSide && !this.isRemoved()) { this.kill(); if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { -> ISSUE START for(int i = 0; i < 3; ++i) { this.spawnAtLocation(this.getVariant().getPlanks()); } for(int j = 0; j < 2; ++j) { this.spawnAtLocation(Items.STICK); } -> ISSUE END } } } this.resetFallDistance(); } . . . }
Suggested Fix
Introduce a loot table for sticks and planks dropped from boats.
Notes:
Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875
The carved pumpkin drop from shearing a snow golem is hardcoded. This issue was created due to the fix for MC-267866.
Code Analysis:
Method shear() in SnowGolem public void shear(SoundSource soundSource) { this.level().playSound((Player)null, this, SoundEvents.SNOW_GOLEM_SHEAR, soundSource, 1.0F, 1.0F); if (!this.level().isClientSide()) { this.setPumpkin(false); -> ISSUE START this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), this.getEyeHeight()); -> ISSUE END } }
Suggested Fix
Introduce a loot table for shearing a snow golem.
Notes
Relates to: MC-94610 MC-109377 MC-149589 MC-173732 MC-177712 MC-202586 MC-235754 MC-235755 MC-267866 MC-269035 MC-269838 MC-269839 MC-269873 MC-269874 MC-273941 MC-273942 MC-273943 MC-273944
The bug
When right clicking on cave vines, glow berries are dropped at its location. This does not appear to be tied to its own loot table - it either reuses the loot table for breaking vines, or is a hardcoded drop.
How to fix
Introduce a dedicated loot table for right clicking on cave vines.
Relates to: MC-94610 MC-109377 MC-149589 MC-173732 MC-177712 MC-202586 MC-235754 MC-235755 MC-267866 MC-269035 MC-269838 MC-269839 MC-269873 MC-269874 MC-273941 MC-273942 MC-273943 MC-273944 MC-276629 MC-276634
The bug
24w37a added a new loot table for armadillos dropping scutes. This loot table is correctly used for when they drop scutes over time, but is not used when brushing manually.
How to reproduce
A data pack that makes armadillos drop player heads instead of scutes is attached to this ticket.
- Download and apply this data pack
- Wait for an armadillo to drop something
- Manually brush the armadillo
Expected results
In both cases the same item would drop.
Actual results
When brushed manually it still drops scutes.
How to fix
Either make brushing use the armadillo_shed loot table, or add a dedicated loot table for brushing.
Witch potions are held items, like when a zombie holds a sword, so not part of loot tables. The others are arguably bugs though, since loot tables could express them now, I think.
As in the related bug, mob heads (from electrified creepers) arguably also should be in tables...
Oh wait, tables only have killed_by_player conditions, so music discs and mob heads cannot be expressed. (And possibly witherboss drop has some magic explosion-protection, so perhaps this is all WAI for now.) It would be nice if they 'finished' the loot tables feature so all drops were expressed, but that seems unlikely.
@Brian McNamara, Concerning WitherBoss: the nether star items themselves are always explosion-proof regardless of where they came from.
Villagers don't have a loot table at all!
You are right, but this is probably a different bug. You should probably create a new report for this.It is
MC-95450Yes for 17w16a
Creepers could test to see if the conditions were "killer" and properties name was minecraft:skeleton, perhaps. For mob heads each loot table would need to be modified to test if the "killer" was a creeper with a "powered" property of true.
If the set_nbt loot table function would be able to modify the tags of the direct_killer, the attached file zombie.json
would work exactly like it should.
With the current state of loot table functions it is not possible to prevent multiple head drops from the same creeper.
I believe that jungle fishing is also missing, correct me if i'm wrong though.
Confirmed in 1.16.1
Confirmed for 1.17.1.
Affects 1.18
Affects 1.18.1
Affects 22w12a.
Can confirm in 1.19.2. Here's a code analysis of this issue.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.19.2 using Mojang mappings.
This is happening because the drop of a mob head from the death of a charged creeper explosion is controlled by the dropCustomDeathLoot() method which is present within the classes of all mobs that are able to drop their heads upon being killed by a charged creeper explosion. Because the drops are controlled this way, they don't have loot table entries, therefore resulting in several issues such as the given mob always dropping its head despite having an assigned "DeathLootTable" NBT tag.