mojira.dev
MC-93768

Guardian beam creates air bubbles on land

The bug

When a guardian targets a player or squid on land the beam shows air bubbles.

How to reproduce

  1. Summon a guardian (riding an armor stand) on land using the following command:

    /summon minecraft:armor_stand ~ ~ ~ {Passengers:[{id:"minecraft:guardian"}]}
  2. Switch to survival mode /gamemode survival
    ❌ When the guardian attacks, air bubble particles appear in its beam

Expected behavior

Because the guardian is already on land, the particles from its beam should not include air bubbles.

The reason

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The affected method is net.minecraft.entity.monster.EntityGuardian.onLivingUpdate(). This method first tests if the Guardian is in water and the beam is active and then creates air bubbles. However after this it tests if the guardian targets an entity and then creates air bubbles without testing if the Guardian is in water.

Note: I am not sure if it is intended that Guardians that target an entity in water create air bubbles twice.

Attachments

Comments 29

Confirmed for 1.13-pre8

19 more comments

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.2.

marcono1234

(Unassigned)

Confirmed

Gameplay

Low

Rendering

air, beam, bubble, guardian

Minecraft 15w49b, Minecraft 1.9, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, ..., 1.20.3 Release Candidate 1, 1.20.4, 1.21.5, 1.21.7 Release Candidate 2, 1.21.8

Retrieved