mojira.dev
MC-122519

if block argument in /execute does not work correctly

A few things:
1.) Entities other than the player detect blocks they're in as an air block.
/execute as @e[type=item] if block ~ ~ ~ oak_sapling run say hi will never run. /execute as @e[type=item] if block ~ ~ ~ air run say hi will run even if the item is currently inside a sapling.

2.) Entities other than the player have unreliable offset block detection.
/execute as @e[type=item] if block ~ ~1 ~ air run ... doesn't always work when it should, and sometimes works when it shouldn't.

3.) Entity "if" check inside a function not run by the player does not work.
In a contraption I'm working on, execute as @e[type=item,nbt={Item:{id:"minecraft:apple",Count:1b},OnGround:1b}] if entity @e[type=area_effect_cloud,distance=0..3,nbt={Potion:"minecraft:regeneration"}] run tag @s add 0x_appleSaplingItem (couldn't monospace it) works when the function it's in is run by the player, but not when the function is run by a command block, even if the command block executes it as the player.

Comments 3

This sounds like MC-121934. Can you test to see if this matches your issue?

As only changes who runs the command, not where it is run.

Am I going insane? I swear this was a completely different issue when I commented; this doesn't resemble MC-121934 in the slightest!

Ozone Smith

(Unassigned)

Unconfirmed

Minecraft 17w47b

Retrieved