mojira.dev
MC-124444

Gamerule maxCommandChainLength allows 0 and negative integer values

The Bug

The gamerule maxCommandChainLength allows 0 and negative integer values, this makes no sense.

How to Reproduce

/gamerule maxCommandChainLength -1

Observed Behavior

The "maxCommandChainLength" gamerule allows 0 and negative integer values.

Expected Behavior

The "maxCommandChainLength" gamerule would not allow 0 and negative integer values.

Linked issues

Attachments

Comments 15

Confirmed for 1.13.1-pre1

Confirmed for 1.13.1

Can confirm in 20w49a.

Can confirm in 21w03a.

Can confirm in 21w05b.

5 more comments

Can confirm in 1.18.2 and 22w16b.

Can confirm in 1.19 and 22w24a.

Can confirm in 1.19.2.

In my opinion 0 should be allowed, and should effectively disable command blocks

@@unknown, I think it might be better to have a separate gamerule (or even separate command which requires higher OP-level) for that. That would make it easier to discover and would avoid potentially undesired effects on other command execution logic (see also MC-124446, not sure if that still applies).

marcono1234

(Unassigned)

Confirmed

Commands

/gamerule, maxCommandChainLength

Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w06a, Minecraft 1.13-pre1, Minecraft 1.13, ..., 1.19, 22w24a, 1.19.2, 1.19.3, 23w03a

Retrieved