Translation notice
This page was translated with machine translation and may contain inaccuracies. If you can help improve it, please open an issue or submit a pull request.
Second cover
What's New in the Library?
- NBT Autocomplete - Provides in-game nbt automatic completion
- vanilla technology development tutorial - Xu Muxian
- Where can I find the historical version of my worldwiki?
- [Minecraft] Animated Javavanilla model animation production basic tutorial ①--taking version 1.20.1 as an example
- blockbench modeling software quick start tutorial document - Ita Miaoah
- NexusMC - Minecraft Community
- VM Chinese group
- CTM Map Resource Station
Command Flashlight Command Flashlight
Fast entity accessor
We know that using Itementity's Throwertag can save the UUID reference of the entity and access it efficiently:
mcfunction
# 将当前实体的UUID保存到物品NBT中
# 假设我们物品实体的uuid固定为0-0-0-0-1
data modify entity 0-0-0-0-1 Thrower set from entity @s UUIDAs long as this entity still exists, we can access this entity through this item anywhere in our data pack:
mcfunction
execute as 0-0-0-0-1 on origin run <命令>But what if you want to store references to multiple entities? We can let multiple items ride on a world entity and access it with the help of world entity:
mcfunction
# 假设世界实体是0-0-0-0-2
execute as 0-0-0-0-2 on passengers on origin run <命令>When we want to add a new entity reference, we only need to let a new itemity ride on the world entity without limiting the UUID of the itemity.