From 6793fec67b2d922ae4f377ed434cc0cf16ec9092 Mon Sep 17 00:00:00 2001 From: ShaneBee Date: Thu, 2 Nov 2023 14:58:06 -0700 Subject: [PATCH] ExprNbtCompound - add more docs --- .../skbee/elements/nbt/expressions/ExprNbtCompound.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/shanebeestudios/skbee/elements/nbt/expressions/ExprNbtCompound.java b/src/main/java/com/shanebeestudios/skbee/elements/nbt/expressions/ExprNbtCompound.java index 6f31d7da..1e7ec601 100644 --- a/src/main/java/com/shanebeestudios/skbee/elements/nbt/expressions/ExprNbtCompound.java +++ b/src/main/java/com/shanebeestudios/skbee/elements/nbt/expressions/ExprNbtCompound.java @@ -44,12 +44,17 @@ "\n'nbt compound' from an item will be the original. This will return the 'tag' portion of an items full NBT.", "Modifying this will modify the original item.", "\nNBT from a file will need to be saved manually using", - "the 'NBT - Save File effect'. If the file does not yet exist, a new file will be created."}) + "the 'NBT - Save File effect'. If the file does not yet exist, a new file will be created.", + "\nNBT Compounds can be added to each other, thus merging them. See Examples."}) @Examples({"set {_n} to nbt compound of player's tool", "set {_nbt} to nbt compound of target entity", "set {_n} to nbt compound of \"{id:\"\"minecraft:diamond_sword\"\",tag:{Damage:0,Enchantments:[{id:\"\"minecraft:sharpness\"\",lvl:3s}]},Count:1b}\"", "set {_nbt} to nbt compound of file \"world/playerdata/some-uuid.dat\"", - "set {_n} to nbt compound of chunk at player"}) + "set {_n} to nbt compound of chunk at player", + "", + "add nbt from \"{NoAI:1}\" to nbt of last spawned entity", + "add nbt from \"{NoGravity:1}\" to nbt of {_entity}", + "add nbt from \"{custom:{points:1}}\" to nbt of player"}) @Since("1.6.0") public class ExprNbtCompound extends PropertyExpression {