mojira.dev
MC-307774

The `bool(arg)` SNBT operation returns false for some non-zero number values

The SNBT operation bool(arg) currently returns false for decimal values which are greater than -1 but less than 1. This doesn’t look like the intended behavior for the operation, which states that it returns true for non-zero number values.

How to Reproduce

  1. Run the command /data merge storage a:a {x:bool(0.5)}. This stores the output of the bool operation into the storage a:a.

  2. Run the command /data get storage a:a. This shows the message: Storage a:a has the following contents: {x: 0b}. This means that the operation resulted in a false for the value 0.5, even though it is non-zero.

Comments 0

No comments.

Laptop59

etanaratsastaja

Confirmed

Platform HC

Normal

Commands

26.2 Snapshot 4

26.2 Snapshot 6

Retrieved