mojira.dev
MC-133708

Spectator Spawns Ground Particle after Entering Entity

The bug

When in spectator mode, and entering any entity by left clicking it, while sprinting close to the ground (so the sprint particles are visible), the particles will continue to be created for about 8 blocks.

The fact that spectators can cause these particles is a bug in my opinion.

How to reproduce

  1. Spawn an entity, like a villager, preferably with NoAI:true so its easier to hit them

  2. Set your game mode to spectator

  3. Sprint close to the ground, and adjust the height until the particles are visible

  4. Sprint towards the entity, and click it once in range. Sprint towards it from behind, else the particles will not be in your view
    ❌ Particles are shown

Attachments

Comments 2

I cannot reproduce this behavior in 1.19.2. I took a look into the game's code following my failure in reproducing this issue and found that the canSpawnSprintParticle() boolean returns false if the player is in spectator mode, and this would be the correct and expected behavior since spectators should not be able to spawn sprint particles, which they indeed do not.

With that being said, this was likely fixed at some point but I can confidently confirm that this problem is no longer present. Here's the code analysis I conducted to reinforce my claims here.

Code Analysis:

The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.

net.minecraft.world.entity.Entity.java

public abstract class Entity implements Nameable, EntityAccess, CommandSource {
   ...
   public boolean canSpawnSprintParticle() {
      return this.isSprinting() && !this.isInWater() && !this.isSpectator() && !this.isCrouching() && !this.isInLava() && this.isAlive();
   }
   ...

If we look at the above class, we can see that the canSpawnSprintParticle() boolean returns false if the player is in spectator mode. This basically means that players in spectator mode cannot produce sprint particles which is the correct and expected behavior.

I am also unable to reproduce this behavior in 1.19.2. Closing as Cannot Reproduce.

HurricanKai

(Unassigned)

Confirmed

(Unassigned)

Minecraft 1.13-pre9, Minecraft 1.13, 20w10a

Retrieved