25% OFF First Invoice

Code at Checkout: APEX25

How to Edit NBT Files in Minecraft

in General

mc head By Dalton Whalen

How to Edit NBT Files in Minecraft

Overview

When playing Minecraft on a server with friends or a solo world in singleplayer, we very rarely spend time thinking about how the game keeps track of data. Whether it’s the world settings itself or a player’s inventory, this information is kept in various files that are often inaccessible to most people. This is no longer the case thanks to a tool called NBTExplorer, which allows you to view and edit any world’s data files. Whether you want to locate a player or want to know how to disable hardcore mode, this all achievable with this program. This process can be very confusing for first-time users, so we have created this Apex Hosting tutorial to help you get started.
 

NBTExplorer Download

  1. Navigate to the NBTExplorer GitHub page.
  2. Press the Releases tab to the far-right to access all downloads.
    Releases
  3. Under the Assets area for the latest release, download the NBTExplorer .zip file.
    Download
  4. Extract the .zip contents inside of an easily-accessible folder.
  5. Launch the NBTExplorer.exe file to open the application.
    Launch program

 

Locating Files for Editing

Before you start editing any NBT data, we recommend locating the desired file, then downloading or making a copy of it to your desktop or other safe location. This can help revert any changes you make in the event of an error.
 

Server NBT Files

  1. Navigate to your Apex Server panel, then stop the server.
  2. Enter the FTP File Access in the left-hand menu, then log in.
    FTP File Access
  3. Locate your desired world folder and click to enter its subdirectory.

 

To adjust the world values such as game rules or hardcore mode, click level.dat to download the file to your device. Alternatively, enter the playerdata folder and find the desired file based on the UUID. The exact UUID can be found using a site like MCUUID.

Level Dat

 

Singleplayer NBT Files

  1. Open your Minecraft launcher, then proceed to the Installations tab at the top.
  2. Hover over your gameplay profile, then press the Open Folder icon to the right.
    Open Folder
  3. In the new window, enter the saves folder, followed by your world file.
  4. Like before, locate either the level.dat or a .dat file from the playerdata folder.
    Playerdata
  5. Copy this file to a separate location, such as the desktop.

 

Introduction to NBTExplorer

With your files safely stored on your device, you’re ready to begin using the NBTExplorer app. To start, simply drag + drop your desired file into the program to open it. Alternatively, go to File > Open, then select your .dat file through there.

Explorer

To use the program, use the + and boxes to expand or collapse sub-menus and find all options. To adjust a value, double click the data to open up a small window. Enter your new value, then press OK for the changes to take effect. Once you’ve made your changes, press the save icon at the top.

 

Adjusting World Data

World Data Header

When adjusting a level.dat file for a world, there will be plenty of sub-menus and values to edit. While many of them are straight forward based on the name alone, we recommend only editing necessary values to prevent any issues. Some of these notable ones include:

GameRules: Want to adjust the gamerules without using any in-game commands? By expanding the GameRules dropdown you can manually adjust every rule to your liking.

AllowCommands: This option allows you to permanently enable or disable cheats on a world. This can be especially useful if you created a world but forgot to enable cheats at the beginning.

Difficulty: Similar to the gamerules, this allows you to manually adjust the difficulty option of a world, regardless of cheat command access in-game. This can be beneficial if the difficulty has been locked on the world.

DifficultyLocked: Do you regret locking the difficulty on the world but don’t want to use any commands to bypass it? Adjusting this value will unlock the difficulty of your world, allowing for easy adjustment on singleplayer once again.

Hardcore: Whether it was created by accident or not, dealing with a hardcore world can become stressful after a while. Thankfully, a quick change to the hardcore value will remove this limitation from your world and restore normal gameplay.

LevelName: Ever tried to rename a Minecraft folder name and noticed it doesn’t change in the singleplayer world selection? That’s because of this data string, which can be adjusted to reflect a new name regardless of what the original folder is titled.
 

Adjusting Player Data

Player Data Header

Similar to the level.dat world data, player data can also be important and changes as well. There are many more data strings available, but many of them may cause issues when changed so we advise proceeding with caution. Some notable adjustments are:

Abilities: Under the category of the same name, the abilities data allows you to adjust a player’s walkspeed, whether they can fly, build, are invulnerable, and more.

Inventory: While it’s far from the most effective way of achieving it, the Inventory section allows you to see the contents of any player’s inventory, as well as the amount. Alternatively, it can be used to modify the inventory directly.

Position: Trying to find a player or their base? By checking the Pos dropdown, you can view their position coordinates in the world. If necessary, this can be combined with the Dimension data if they are not located in the overworld.

Health/Food: As the name suggests, the foodLevel and Health data strings control the character’s fullness and hearts. 20 is a full bar, while 0 is completely empty.
 

Replacing Files

With your changes made and saved, you can now replace the existing file on either your client or server. We highly recommend making an additional backup, which is reflected in the steps below:

  1. Return to your world or playerdata folder on the client/server from earlier.
  2. Select the original .dat file, then rename it to end with .dat.backup.
    Backup File
  3. If present, select and delete the matching .dat.old file as well.
  4.  
    For servers: Press the Upload button in the top-left, then drag + drop your edited .dat file. Once at 100%, verify it was uploaded correctly, then start the server.

    For singleplayer: Copy + paste or move the edited .dat file into the necessary folder. Once it is done, you may start your game and launch the world.

 

Once in-game, you can check for your changes, which may be visible immediately depending on your selection. For instance, if hardcore mode was disabled, the hearts should be visibly different. If any other changes are needed, we recommend making your adjustments like before, then replacing the .dat file once again.

In Game

 

Common Issues

The changes did not work:

If the desired changes didn’t take effect, there are many potential reasons this may occur. First, verify that you are saving your adjusted .dat file and properly uploading it back to the original world folder in the correct location. If the file is uploaded anywhere else, it will not take effect. Additionally, verify that you are changing the correct file and attribute, or you may not notice the changes as intended. Once you have performed these checks and reuploaded the file, restart the game and try again.

How to restore the original NBT .dat file:

Whether you made a mistake or simply want to revert all your changes, this will be easy to do as long as you perform the above steps correctly. To do this, stop the server/game and return to your .dat file location. Delete or move the current file, then rename the .dat.backup file to just .dat. Afterwards, delete the .dat.old file as well and restart the game. This should return your file back to the original. Keep in mind that performing these steps on a player data file will also revert that player’s position and inventory.
 

Helpful Links

NBTExplorer GitHub
MCUUID Website

Start Your Minecraft Server

Get started with your own minecraft server in 5 min and start trying out these great features.