How to freeze the day night cycle?
I want to permanently freeze the day night cycle, how would one go about doing that on Java version 1.21.11?
I have looked it up, every source I find says to use the command "/gamerule doDaylightCycle false", however, as you can in see in the image I have provided, this does not work. Did the command change? Have they taken away that ability (and are there versions where it does work)?
I have looked it up, every source I find says to use the command "/gamerule doDaylightCycle false", however, as you can in see in the image I have provided, this does not work. Did the command change? Have they taken away that ability (and are there versions where it does work)?
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
First off, the renaming, as far as I'm aware, does not make it any easier for datapacks. While it is true that many features are being made data-driven, especially in recent updates, the gamerules were not made data-driven, just renamed. Additionally, it's been possible to run commands with datapacks since they were added in 1.13, using a .mcfunction file and the `/function` command.
As for why they were renamed. In recent updates, Mojang has been changing a lot of technical names, such as entity data tags, from using CamelCase to snake\_case. The most likely reasons for this that I can think of is readability, as snake case separates words with underscores instead of capitalizing every word with no separation, and consistency, as while most old data tags were in camel case, some were in snake case, and it could get confusing when you have to remember if a tag starts with a lowercase or uppercase letter.
Gamerules were "hardcoded", this means the code that defined them was all in one place, to add to it you have to modify that file. That works well for Mojang, but it makes it a pain for mods to extend it (They have to inject into that using mixins) and has it's own naming system that wasn't really well defined).
They've moved it to a registry in 1.21.11 . Registries are something that is designed as catch-all solution to "I need to map a unique name to a thing (Thing being an item, block,entity type, enchantment, villager trade, structure.... the list goes on), rather than the old system where each of these had their own special half copied half unique version of a registry just for that specific thing. Registries can either be locked when a world loads (World generation related ones) or modifiable/reloadable during gameplay (recipes, advancements).
The catch is, **all registries use the same "Identifier" spec.**
that spec is "namespace:lowercase\_letters\_and\_dashs/and\_maybe\_slashes"
Which doesn't allow them to map the old "doDaylightCycle" to it.
So they've changed, and seem to have taken the oppurtunity to ***HOPEFULLY*** write some rules down about naming conventions.
tl;dr Instead of having custom just for gamerules code for managing all the gamerules, they're now using the same registry code as used elsewhere for structures/advancements etc. This registry code has a restriction/standardization on the format of the identifier which is why the names changed. It also appears they might have tried to settle on some rules as to how to word gamerules so intent is clearer as to what they do.
As someone that deals with legacy software regularly, aliases would just kick this can down the road and the community would just bitch when those aliases were finally removed.
The names had to change since they only allow a certain set of characters
It's less for data pack Devs (ATM), and more overhauling an internal system, which, in the future might allow data-driven gamerules (IE adding them via data packs), and improved mod support
I think it's fine, especially as most users might not even need to use the command if they set it in the gui on world creation