mojira.dev
MCPE-236442

Block face location return values are nonsensical

The return values from the faceLocation property in scripting are nonsensical. Documentation for the field says that the property returns a Vector3 that is:

Relative to the bottom north-west corner of the block

This is not true. Worse yet, values are inconsistent, varying based on the position of the block in the world. This problem has only been tested on the BlockComponentPlayerInteractEvent class. It may be present in other situations.

Demonstration

The attached video shows a single case of the bug in question. When interacting with the custom glowstone-textured block, the faceLocation coordinates are logged. Notice the y-location in particular. In the first block shown, which is above y-0, the y-value decreases while moving down the face. However, when interacting with the second block, which is below y-0, the y-value increases.

Reproduction

The demo video and code are taken from the behavior pack in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Ensure the content log is enabled before testing this pack.

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Ciosciaa

(Unassigned)

Plausible

Multiple

26.10.24 Preview

Retrieved