mojira.dev
MC-131643

/execute if entity bug

If you use /execute if entity @e[dx=,dy=,dz=,..] the command block shoul emit redstone to the redstone comparator.

The bug is at the detection of the interpretation of distance coordinates. It correctly detects in the negative directions, but in the positive directions detects one block more than spected.

In the pictures below there is an example. Red area is the detection area. The commands are:

/execute if entity @e[dx=2,dy=2,dz=2]

/execute if entity @e[dx=-2,dy=2,dz=-2]

 

Steps to Reproduce:
1. Put a iterative command block whith no redstone needed (it not depends on it, it's just more simple to build and test).
2. Insert a command of type /execute if @e[dx=,dy=,dz=,..]
3. Observate the area it detects.

Attachments

Comments 1

Works as intended
Command blocks execute their commands from the middle of the block. dx, dy and dz aren't floored to an integer position anymore. So a command run at 5.5 50 5.5 with dx=2,dy=2,dz=2, will target the area 5.5,50.5,5.5 to 7.5,52,7.5

To fix this, you'll have to use /execute align xyz

No Name

(Unassigned)

Unconfirmed

Minecraft 1.13-pre2

Retrieved