The bug
Honey block particles are always produced at the player's or mobs feet.
Instead of producing particles based on where the honey block is in contact with the players or mobs.
How to reproduce
Summon a honey block above your head
/setblock ~1 ~2 ~ minecraft:honey_block
Jump and slide down it and as you do this watch the particles that are produced closely
Take note as to whether or not honey block particles are always produced at the feet of entities
→ ❌ Honey block particles are always produced at the feet of entities
Expected behavior
Honey block particles would not be always produced at the feet of entities. Instead, they should be produced at the position where the entity model comes into contact with the honey block.
Examples
[media][media]
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 1
relates to 3
Attachments
Comments 10
Can confirm in 21w42a. Here are some extra details regarding this problem.
The Bug:
Honey block particles are always produced at the feet of entities.
Steps to Reproduce:
Summon a honey block above your head.
/setblock ~1 ~2 ~ minecraft:honey_block
Jump and slide down it and as you do this watch the particles that are produced closely.
Take note as to whether or not honey block particles are always produced at the feet of entities.
Observed Behavior:
Honey block particles are always produced at the feet of entities.
Expected Behavior:
Honey block particles would not be always produced at the feet of entities. Instead, they should be produced at the position where the entity model comes into contact with the honey block.
I can confirm this in 1.18.1.
Here's a code analysis of this issue. The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
Code Analysis:
net.minecraft.world.level.block.HoneyBlock.java
public class HoneyBlock extends HalfTransparentBlock {
...
private static void showParticles(Entity $e, int $i) {
if ($e.level.isClientSide) {
BlockState blockstate = Blocks.HONEY_BLOCK.defaultBlockState();
for(int i = 0; i < $i; ++i) {
$e.level.addParticle(new BlockParticleOption(ParticleTypes.BLOCK, blockstate), $e.getX(), $e.getY(), $e.getZ(), 0.0D, 0.0D, 0.0D);
}
}
}
}
If we look at the above class, we can see that particles from sliding down honey blocks are always produced according to the player's "x", "y", and "z" positions. This is evident through the following line of code:
$e.level.addParticle(new BlockParticleOption(ParticleTypes.BLOCK, blockstate), $e.getX(), $e.getY(), $e.getZ(), 0.0D, 0.0D, 0.0D);
Since the "y" position of a player by default is located around their feet, particles from sliding down honey blocks are always produced here.
I feel like this is intended maybe