gamerule commands is mostly a solved problem, with a few entries that quietly stopped working.
Short answer
Enable them knowing achievements usually switch off and some effects cannot be undone in that save.
Glitches get patched and codes tend not to, which makes codes the more durable option. Anything that requires downloading a program is not a cheat code. Minecraft is not shy about hiding useful information two menus deep, so some of this is simply knowing where to look.
What counts as a cheat here
Case and spacing matter more than the lists suggest. Anything requiring an external program is a different category with different risks attached. Nothing below assumes you have read anything else first. A cheat menu built into the game cannot get you banned, whatever the forum says.
Some effects stack in ways the developers did not intend and the game does not handle gracefully. The short version is near the top on purpose; the reasoning is there if you want to know why. A code that worked on an older patch may have been removed rather than changed.
Achievements and save files
Codes typically do not persist through a reload, which surprises people who use them for convenience. If this seems to describe a different version, it probably does, and that is the thing to check first. Enabling cheats disables achievements in most games, and the warning is easy to miss.
- Never use any of this in an online mode.
- Re-enter the same code to toggle an effect off.
- Expect one number in every guide to be out of date; the method is what matters.
- Enter codes exactly, including spacing.
- Save manually before using anything irreversible.
- Region and platform change more than people expect, so confirm both.
Codes that stopped working
Codes entered correctly and rejected usually mean the wrong platform variant. Older threads are worth reading for the reasoning rather than the conclusions. Achievement locking is usually per-save rather than per-account, but not always. Anything that alters save state can corrupt it, which is why a separate save is worth the ten seconds.
Version numbers matter more here than anywhere else in the discussion. Controller-entered codes need rhythm rather than speed. Console entry uses button sequences with tight timing, and mistiming reads as a broken code.
What you give up
Do the cheap check before the expensive one — that ordering alone saves most of the frustration. If a site asks you to sign in to receive a code, it is not a code. Single-player cheats are a supported feature; the same behaviour online is a ban.
What follows assumes you are on a current install and have not modified it. Some effects cannot be undone within a save, and the game does not always warn you first. Console commands and cheat codes are different systems with different consequences.
Codes that no longer work
It helps to understand why a step exists, because then you can adapt it when your situation is slightly different. A code that softlocks a mission is a known risk in more than one of these games. Codes are usually case-insensitive but rarely space-insensitive.
Where people go wrong
- Reading a summary of the patch notes instead of the patch notes.
- Grinding a method that was patched months ago because a thread still ranks well.
- Ignoring the platform-specific note and then wondering why the steps do not line up.
- Assuming a page is current because it ranks first.
Minecraft FAQ
What if none of this works for me?
Then something in your setup differs from the assumption — version, region or platform. Check those three before anything else.
Do the effects save?
Rarely. Most reset when you reload, which makes them convenience rather than permanent change.
Is there a faster way to do this?
Usually, and it usually trades reliability for speed. Which one you want depends on whether you plan to repeat it.
Why do other guides describe this differently?
Most were written for an earlier version and never revisited. Compare the steps against what your build actually shows.
Come back to the caveats list if it does not work first time — the answer is almost always in there.