mojira.dev
MC-163944

Honey block particles are always produced at the player's or mob's feet

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

  1. Summon a honey block above your head

    /setblock ~1 ~2 ~ minecraft:honey_block
  2. Jump and slide down it and as you do this watch the particles that are produced closely

  3. 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

Attachments

Comments 10

I feel like this is intended maybe

Still in the 1.15-pre2.
Also affected other mobs.

Can confirm in 21w05b.

Can confirm in 21w07a.

Can confirm in 21w14a.

Can confirm in 1.17.

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.

Can confirm in 1.18.2.

[Mod]Les3awe

(Unassigned)

Confirmed

Platform

Normal

Particles

feet, honey_block, mob, particle, player

19w42a, 19w44a, 19w45a, 19w45b, 19w46a, ..., 1.21.5, 25w17a, 1.21.6 Pre-Release 3, 1.21.8, 25w34b

1.15 Pre-Release 2

Retrieved