NBT
NBT tags are used to represent complex datastructures. These are typically used internally in Minecraft to store machine and entity information. In this tutorial, we will go over simple NBT tag reading and manipulation
As a first step, use a Block Reader on a lectern, read its NBT data, and visualize it in a Display Panel.
Next, from the read Lectern NBT tag, read the Book sub-tag as a compound tag, and visualize it.
As a final step, we will read the id field from this Book sub-tag. However, instead of starting from our last read sub-tag, we will start from the root, and apply an NBT Path expression. Such expressions are useful to get deeply nested NBT values. For example, applying the expression ”.root.child1.child2” on the NBT tag { root: { child1: { child2: ”some value” }}} will output ”some value”. More advanced features of NBT Path are described later in the advanced part of the manual.
To accomplish the final advancement, create an NBT Path expression that selects the Book/id field, apply it on our Lectern tag, and visualize it in a Display Panel.
Uitvoer: NBT
- NBT
- Tekenreeks
- NBT
- Tekenreeks
- NBT
- NBT
- Lessenaar NBTLees het NBT label van een machine met behulp van een bloklezer, zoals de lessenaar.
- Lessenaar NBT boekLees het NBT boekveld van een lessenaarblok uit het NBT label gelezen door een bloklezer.
- Lessenaar NBT boeknaamLees de naam (ID) van een boek in een lessenaarblok door een NBT-pad uitdrukking toe te passen op het NBT label gelezen door een bloklezer.