Integrated Dynamics - On the Dynamics of Integration

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.

Aspect
Blokentiteit NBTDe doelblokentiteit als NBT

Uitvoer: NBT

    Operator
    NBT Compound Value CompoundNBT{}.get_compoundThe Compound value in the given NBT compound tag with the given key
    • NBT
    • Tekenreeks
    • NBT
    Global name: nbtGetCompound(NBTTekenreeks) → NBTMethod name: NBT.getCompound(Tekenreeks) → NBT
    Operator
    NBT Path Match FirstNBT.path_match_firstApply the given NBT Path expression on the given NBT value, and return the first match
    • Tekenreeks
    • NBT
    • NBT
    Global name: stringNbtPathMatchFirst(TekenreeksNBT) → NBTMethod name: Tekenreeks.nbtPathMatchFirst(NBT) → NBT
    Advancements
    • 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.
    Beloningen
    Variabelekaart30
    Machinelezer5
    Weergavepaneel5