Mojira Archive
MC-251617

Advancement trigger player_killed_entity checking for an entity's dimension always checks for the player's dimension instead

Setting the location.dimension field of the entity condition in player_killed_entity will not make the advancement check for the entity's dimension, but the dimension the player that will get the advancement is in.

How to reproduce:

  1. Summon a ghast with no AI in the nether.
  2. Use /forceload add on the chunk the ghast is in, or have another player stand close to the ghast to make sure it is loaded.
  3. Place a TNT block next to it.
  4. Light the TNT using flint and steel or a fire charge and go through a nether portal before it explodes.
    You just got the advancement "Uneasy Alliance", even though the ghast was in the nether.

Expected result:

The advancement would require the ghast to be in the overworld.

Observed result:

Only the player is required to be in the overworld.

Code analysis:

Code analysis by [Helper] Misode can be found in this comment.