-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 1.13.2, Minecraft 18w43c, 1.14.4, 19w37a, 19w38a, 1.15.1, 1.15.2, 1.16 Pre-release 1, 1.16.3, 1.16.4 Pre-release 1, 20w49a, 21w03a, 1.16.5, 21w06a, 21w08b, 1.17.1, 1.19, 1.19.3, 23w06a, 1.20.1, 1.20.2, 23w41a, 23w43a, 23w46a, 1.20.3, 1.20.4 Release Candidate 1, 1.20.4, 24w07a, 1.20.5
-
Confirmed
-
Entities, Loot tables
-
Low
-
Platform
The Bug:
When a falling block entity is destroyed, it will exclusively drop whatever block it's "BlockState" data is, ignoring any loot tables for the block.
Steps to Reproduce:
Summon a falling block entity set to a "double oak slab"
/summon falling_block ~ ~ ~ {BlockState:{Name:"minecraft:oak_slab",Properties:{type:"double"}},Time:601,DropItem:1b}
Observed & Expected:
- The falling block entity will be destroyed, and drop a single oak slab.
- The falling block entity would drop whatever it's 'BlockState' data is set to. In this case it would be two oak slabs, as the slab block is double.
Screenshots/Videos:
Notes:
- This directly affects gameplay, as if the player specifically changes a block's loot table which has a naturally occuring falling block entity counter part (such as sand, gravel, or pointed dripstone), it will always drop itself, and not evaluate any custom loot tables set (See MC-212228). This primarily negatively impacts map creators.
Code Analysis:
Near the end of the below "tick()" method, if some conditions are met and the entity is discarded, it will execute the "spawnAtLocation(Block)" method which simply takes in the block state of what ever the falling block entity is set to, and return that.
Class: net\minecraft\world\entity\item\FallingBlockEntity.java Method: tick()
(Method condensed for ease of reading)
. . . Block block = this.blockState.getBlock(); . . . . . . } else { this.discard(); if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.callOnBrokenAfterFall(block, blockpos); //Issue Start this.spawnAtLocation(block); //Issue End } } . . .
- causes
-
MC-212228 Pointed dripstone blocks do not properly evaluate custom loot tables after breaking by falling
- Open
- is duplicated by
-
MC-118095 Dropping gravel on a torch never yields flint
- Resolved
-
MC-167321 Falling blocks with NBT data do not transfer NBT data to item when they are destroyed
- Resolved
-
MC-170335 Dropping gravel on a torch never yields flint
- Resolved
- relates to
-
MC-149589 The wither boss will always drops a nether star regardless of its DeathLootTable data
- Open
-
MCPE-120366 Gravel never drops flint when falling on a non-solid block. (such as a torch)
- Open