[24-12-09]..只有一层数据的情况下没什么区别,modify是改变某个键的值,merge是直接插入并覆盖同名数据,母键被覆盖会导致子键消失,比如你想改变{data:{data1:1, data2: 2}}中键data
/data(get|merge|modify|remove)(entity|block|storage) /data这个指令有4个子指令,分别对应了3种不同的“修改”, 这些子指令是:查询(get),删除(remove),与修改(merge与modify): 它们紧接着data之后,决定了“你要干什么”。 而在无论哪一条子指令后,接下来要写入的是NBT的来源,它可以是实体(entity)的NBT,...
此时我们输入/data modify entity 路人甲 Pos set from entity 炮灰乙 Pos 那么"路人甲"的Pos标签会和"炮灰乙"的Pos一样即[0.0d,1.0d,4.0d] 当然两个标签可以不同,但是数据类型必须符合上述子命令适用的类型否则无法更改,比如这里的Motion和Pos一样都是列表所以可以更改 比如我们输入/data modify entity 路人甲...
/data modify entity @e[x=0,y=64,z=0,type=dolphin,limit=1] Attributes[{Name:"minecraft:generic.armor"}].Base set value 20 将位于(1, 64, 1)处容器内的第一个物品设置为钻石(保留原有的其他NBT): /data modify block 1 64 1 Items[0].id set value "minecraft:diamond_block" 将最近的僵尸...
In both: register and addModifyArgument. but only the loop from addModifyArgument is usefull for(DataCommand.ObjectType objectType : TARGET_OBJECT_TYPES) Code snippet from net.minecraft.server.command.DataCommand.java publicstaticvoid register(CommandDispatcher<ServerCommandSource> dispatcher) { Literal...
Custom Experiences: Server administrators can create custom gameplay experiences by adding data packs that adjust the mechanics, add items, or even modify world generation. How to Add Data Packs to a Minecraft Server Adding data packs to your Minecraft server is a simple process that can be done...
data modify storage nutlet:args uuid set from entity @n[type=minecraft:pig] UUID function nutlet:-m/uuid/int_to_hex 会在storage nutlet:args uuid.hex 返回出 @n[type=minecraft:pig] 的UUID,使用有连字符的十六进制表示方式,这个字符串可以用来当作目标选择器选中实体。 然后编写以下函数文件: test:tes...
Q: Can I copy/modify the code in your datapack/mod? A: As long as you don't distribute the modded version, you may use any or all of my code, as long as appropriate credit is given. Q: Can I use this pack on my public/private server? A: Go right ahead, I do not care wha...
Run the command/trigger gm-editPage. Navigate to your desired GUI and PAGE. Once, that's done, open the GUI by right clicking it, and click the Item whose config you want to modify. Once you do that, the GUI will kill itself and the config will be shown to you. The config display...
Knowledgebase Managing your ServerHow to Use NBTExplorer to Edit Minecraft World Data Contents How to Download NBTExplorer How to Use NBTExplorer to Modify Your Server World More on NBT Editing Still got questions? Require further help? Come chat with us and we will get back to you as s...