Mojira Archive
MCM-1365

Some gamerules cannot be changed by commands when cheats are off

Partner Rank:

2

Partner Team Reporting:

Everbloom Games

Verification builds:

1.17.10.22

Summary:

Some gamerules (the ones below the Activate Cheats switch in the world settings menu) cannot be changed by the gamerule command, when ran by a function or an animation/animation controller. The only exception is command blocks, which can set them without restriction.

Impact:

Many of our maps tend to change gamerules on the fly for various reasons. Sometimes we want to disable mob spawning during the tutorial and re-enable it afterwards, in the case of a survival map (at least two of our more recent maps do this).

Another use case for this is to provide a way to toggle keepinventory in survival maps, without requiring the player to unlock template settings, enable cheats and switch it themselves. This bug makes it so players HAVE to enable cheats themselves for it to work as intended anyway, defeating the point.

Command blocks may be used to circumvent this, but at this stage, a lot of our maps function entirely without command blocks. Requiring us to have physical command blocks placed in the world to achieve this foces us to deal with the issues that we completely avoid using functions or animations, such as concealing commands or having tickingareas that may or may not load in time.

Additionally, issues caused by this aren't usually caught as we develop maps with cheats on, and turn them off at the very end, so it is very likely that there are maps up on the marketplace right now whose keepinventory switches don't work at all, or don't behave as expected. This breaks the expectation that our maps should behave the same whether cheats are on or off.
 
Repro Steps:

  1. Open the provided world
  2. Crouch. Observe the sun.

Expected:

The sun should be moving as long as you crouch, as the gamerule dodaylightcycle is set to true via an animation controller.

Observed:

Nothing happens - dodaylightcycle is not set to true when you crouch, despite the command running.

Screenshots/Videos attached:

Yes: Gfycat.

Regression Builds:

Unknown. Tested as far back as the first 1.15 build and the bug was present there too.

 

Unresolved

Energyxxer

2021-06-16, 05:02 AM

2021-06-16, 10:23 PM

7

2

Future Release

-