mojira.dev
MC-68541

Custom /gamerule needs a false mode!

I don't see the point in being able to make your own gamerules if you can't disable them. A custom gamerule should not output a signal from a command block if the gamerule is set to false or 0.

I am aware on the wiki this is proper behaviour, I just find it extremely useless. And if this feature was added then we could really make some cool multiplayer maps and ops could enable/disable certain aspects via a command.

The screenshot demonstrates that even though my custom gamerule is set to false a signal is still being output.

Edit: Thanks to the /stats command, I have found use for this feature!

Attachments

Comments 4

See MC-65113

gamerules simply update. Meaning the comparator will activate regardless of true or false.
I do however feel that if the gamerule does not exist, an error should be given and comparator should not trigger (which seems to be opposite of what wiki claims).

"Attempting to query a game rule which has not yet been set will cause the command to fail."
http://minecraft.gamepedia.com/Commands#gamerule

Right, I saw that post first. I'm not saying this is exactly a bug, I just feel like this needs to change, or there needs to be a way to delete a gamerule to remove the positive output. Otherwise what is this feature even in the game for?

You can use the command stat to get the value of a specific gamerule in a scoreboard objective.

Ah ha! Thank you for your response Mlakuss, at first when I set it up, the scoreboard wasn't updating the objective for me at all. Then I decided to define the objective to myself to see if it just couldn't update because that objective is undefined to me and it worked after that! So now I used the following commands on a clock to ensure each player will always have the objective corresponding to my gamerule:

/stats block ~-1 ~ ~-1 set QueryResult #ServerScore toxicOn
/gamerule doToxicDmg
/scoreboard players operation @a toxicOn = #ServerScore toxicOn

Scott

michael

Unconfirmed

Minecraft 14w34d

Retrieved