How can I edit the .DAT files in the PlayerData folder in minecraft? [duplicate]

I tried opening them with NotePad++ and it just came out as garbled junk. Is there any way I can edit the .DAT file, for example, to make myself go in creative? I am playing modded minecraft if that makes a difference.


Solution 1:

Minecraft .dat files are in NBT format which is a binary format. You can edit them with a third party tool like NBTExplorer. The tag you normally need is Player/playerGameType - set it to 1 for Creative mode. Since you are playing modded though, there might be unintended consequences depending on the mods.