We will first need to get or create the item tag. I will be covering how to modify enchants and attributes. So, you are now familiar with the NBT structure so let's get to writing the code. To get a list from a compound we need to know the list type ID which can be found below: They start at 0 and will also be able to store any type of variable. Lists are ordered by in which order they were added. What differs lists from compounds is exactly what you would expect. The tag will contain all additional information (such as enchants, attributes, display name, lore, etc). There could also be another compound within the items compound, this is called the item tag. It will also contain a string which will be the items ID (ex. If you take any items compound, it will contain 2 bytes, one for the count (amount of items) and one for the slot (where the item is placed in your inventory). Whenever you create a new item (in the inventory) or entity a new item compound will be created to store all information. It can contain any type of all the "variables", even itself.Ĭompounds will work as a mix of variables that can be accessed in any order and defined and accessible by their "name". The "main" variable type is the compound. Bytes, shorts, integers, doubles, strings, etc. You can think of NBT as a tree of different types of variables (tags) all nested within each other. If you do not feel like installing NBTExplorer and only want it explained, then you can continue taking my basic description on how NBT is structured below. Here is an example of an item I created which I viewed it in NBTExplorer, something I strongly recommend before continuing which would make it easier to understand the entire "learning the NBT structure part". Note: When I talk about compounds I will be referring to NBTTagCompounds.Ī good way to learn an items NBT structure is to actually look at it yourself. If you want to take a look at some more advanced NBT modification code you can take a look at my plugin here. I will also try to answer questions or issues that I myself met along the way. This resource will have as a goal to give you at least a basic understanding of how to modify existing entities or inventory items NBT. The intent is to give you a basic understanding of how NBT tags works and how to edit them. The intent of this resource is not to learn you how to add enchantments/attributes. If you use 1.14+, NBT modification is not always needed (see comments). The version will be based on 1.13 but you can follow the tutorial with minimal change for versions 1.12.2 to 1.14.4. If you need any assistance, please feel free to contact our support team and we will assist you as much as we can.Note: I will be underlining all terms that should be paid attention to as they are important. When you find it, simply delete it, and reupload the world to your server. Open each one, until the X, Y and Z coordinates match with the ones from the Entity's Exact Location, in this case -432.64, 66.98. Double click on Level, and then do the same for TileEntities. In the chunk finder, put in the region X and Z the two numbers from region, in this case, -1 and 1, and the Chunk X and Z, in this case, -28 and 62. 28 and 62 refer to the chunk the entity is in, and -1,1 refer to the region. Now, the numbers that interest us are "-28,62" and "-1,1". You have this part from the Crash Report "Chunk: at 15,4,10 in -28,62", and also this one " Region: -1,1". Now that you opened NBT Explorer, and your world, click on Search -> Chunk Finder. Click on File -> Open Folder, then search for the world folder you downloaded, and open it. (For help, use our article on FTP File Access.) If your crash report does show this, then the problem is already solved. You would use NBT Explorer to generate a crash report. You should use NBT Explorer when you need to attempt to solve any ticking issues without creating a new world. NBTExplorer is also built on top of Substrate. The differences between NBTEdit and NBTExplorer are that NBTExplorer is fully compatible with minecraft's region files, it has a dropdown directory-tree interface for ease of usage, and it offers support for the latest NBT Standard. NBTExplorer is a graphical NBT Editor based on NBTEdit.
0 Comments
Leave a Reply. |