此特性为Java版独有。
此条目的(部分)内容需要翻译。
你可以帮助我们来翻译此条目,但请勿使用机器翻译。
数据包中的标签允许玩家使用JSON文件将物品、方块和函数组合在一起。
用途
為了使用在方塊、物品或函數標籤,JSON檔案必須分別放置於數據包的data/(namespace)/tags/blocks, data/(namespace)/tags/items 或 data/(namespace)/tags/functions裡面。
方塊標籤可以在檢查方塊參數時以#(namespace):(tag)的形式被呼叫,如果指定方塊符合任何紀錄於標籤內的方塊那麼將會輸出成功。
物品標籤可以在檢查物品參數時以#(namespace):(tag)的形式或者在配方、成就中以"tag": "(namespace):(tag)"的形式被呼叫,如果指定物品符合任何紀錄於標籤內的物品那麼將會輸出成功。
函數標籤可以在/function指令中以#(namespace):(tag)的形式被呼叫,這將會讓多個函數依據順序分別執行。
而遊戲本身也使用了這些標籤。原版方塊標籤被用於各種方塊屬性。原版物品標籤被用於各種物品屬性、原版進度檔案與原版配方檔案。
但是並不存在原版函數標籤,因為並不存在原版函數,但任何標記於minecraft:tick標籤的函數都會在每一刻的刻開始時執行,而被標記於minecraft:load標籤的函數則會在載入及重載時執行。
JSON格式
- 根標籤.
- replace: 是否這個標籤應該完全的覆蓋來自較低優先級資料包之同命名空間的同名標籤,當設定為
false時則為為此標簽進行補充。預設為false。 - values: 一個物品、方塊或函數列表。將會接受同類型的其他標籤,但遞歸仍是不可能的。(物品標籤與物品標籤、方塊標籤與方塊標籤、函數標籤與函數標籤,不互通)
- (namespace):(name): 一個列表中的物品、方塊或函數元素。
- #(namespace):(name): 一個列表中的物品、方塊或函數標籤,標籤必須是同種類型。
- replace: 是否這個標籤應該完全的覆蓋來自較低優先級資料包之同命名空間的同名標籤,當設定為
标签列表
方块
| 标签名称 | Values | Usage |
|---|---|---|
| minecraft:anvil | minecraft:anvil, minecraft:chipped_anvil, minecraft:damaged_anvil |
|
| minecraft:banners | minecraft:white_banner, minecraft:orange_banner, minecraft:magenta_banner, minecraft:light_blue_banner, minecraft:yellow_banner, minecraft:lime_banner, minecraft:pink_banner, minecraft:gray_banner, minecraft:light_gray_banner, minecraft:cyan_banner, minecraft:purple_banner, minecraft:blue_banner, minecraft:brown_banner, minecraft:green_banner, minecraft:red_banner, minecraft:black_banner, minecraft:white_wall_banner, minecraft:orange_wall_banner, minecraft:magenta_wall_banner, minecraft:light_blue_wall_banner, minecraft:yellow_wall_banner, minecraft:lime_wall_banner, minecraft:pink_wall_banner, minecraft:gray_wall_banner, minecraft:light_gray_wall_banner, minecraft:cyan_wall_banner, minecraft:purple_wall_banner, minecraft:blue_wall_banner, minecraft:brown_wall_banner, minecraft:green_wall_banner, minecraft:red_wall_banner, minecraft:black_wall_banner | - |
| minecraft:buttons | #minecraft:wooden_buttons, minecraft:stone_button | - |
| minecraft:carpets | minecraft:white_carpet, minecraft:orange_carpet, minecraft:magenta_carpet, minecraft:light_blue_carpet, minecraft:yellow_carpet, minecraft:lime_carpet, minecraft:pink_carpet, minecraft:gray_carpet, minecraft:light_gray_carpet, minecraft:cyan_carpet, minecraft:purple_carpet, minecraft:blue_carpet, minecraft:brown_carpet, minecraft:green_carpet, minecraft:red_carpet, minecraft:black_carpet | - |
| minecraft:doors | #minecraft:wooden_doors, minecraft:iron_door | - |
| minecraft:enderman_holdable | minecraft:grass_block, minecraft:dirt, minecraft:coarse_dirt, minecraft:podzol, minecraft:sand, minecraft:red_sand, minecraft:gravel, minecraft:dandelion, minecraft:poppy, minecraft:blue_orchid, minecraft:allium, minecraft:azure_bluet, minecraft:red_tulip, minecraft:orange_tulip, minecraft:white_tulip, minecraft:pink_tulip, minecraft:oxeye_daisy, minecraft:brown_mushroom, minecraft:red_mushroom, minecraft:tnt, minecraft:cactus, minecraft:clay, minecraft:pumpkin, minecraft:carved_pumpkin, minecraft:melon_block, minecraft:mycelium, minecraft:netherrack |
|
| minecraft:flower_pots | minecraft:flower_pot, minecraft:potted_poppy, minecraft:potted_blue_orchid, minecraft:potted_allium, minecraft:potted_azure_bluet, minecraft:potted_red_tulip, minecraft:potted_orange_tulip, minecraft:potted_white_tulip, minecraft:potted_pink_tulip, minecraft:potted_oxeye_daisy, minecraft:potted_dandelion, minecraft:potted_oak_sapling, minecraft:potted_spruce_sapling, minecraft:potted_birch_sapling, minecraft:potted_jungle_sapling, minecraft:potted_acacia_sapling, minecraft:potted_dark_oak_sapling, minecraft:potted_red_mushroom, minecraft:potted_brown_mushroom, minecraft:potted_dead_bush, minecraft:potted_fern, minecraft:potted_cactus | - |
| minecraft:logs | minecraft:oak_log, minecraft:spruce_log, minecraft:birch_log, minecraft:jungle_log, minecraft:acacia_log, minecraft:dark_oak_log, minecraft:oak_bark, minecraft:spruce_bark, minecraft:birch_bark, minecraft:jungle_bark, minecraft:acacia_bark, minecraft:dark_oak_bark |
|
| minecraft:planks | minecraft:oak_planks, minecraft:spruce_planks, minecraft:birch_planks, minecraft:jungle_planks, minecraft:acacia_planks, minecraft:dark_oak_planks |
|
| minecraft:saplings | minecraft:oak_sapling, minecraft:spruce_sapling, minecraft:birch_sapling, minecraft:jungle_sapling, minecraft:acacia_sapling, minecraft:dark_oak_sapling |
|
| minecraft:stone_bricks | minecraft:stone_bricks, minecraft:mossy_stone_bricks, minecraft:cracked_stone_bricks, minecraft:chiseled_stone_bricks | - |
| minecraft:wooden_buttons | minecraft:oak_button, minecraft:spruce_button, minecraft:birch_button, minecraft:jungle_button, minecraft:acacia_button, minecraft:dark_oak_button |
|
| minecraft:wooden_doors | minecraft:oak_door, minecraft:spruce_door, minecraft:birch_door, minecraft:jungle_door, minecraft:acacia_door, minecraft:dark_oak_door |
|
| minecraft:wooden_pressure_plates | minecraft:oak_pressure_plate, minecraft:spruce_pressure_plate, minecraft:birch_pressure_plate, minecraft:jungle_pressure_plate, minecraft:acacia_pressure_plate, minecraft:dark_oak_pressure_plate | - |
| minecraft:wooden_slabs | minecraft:oak_slab, minecraft:spruce_slab, minecraft:birch_slab, minecraft:jungle_slab, minecraft:acacia_slab, minecraft:dark_oak_slab | - |
| minecraft:wooden_stairs | minecraft:oak_stair, minecraft:spruce_stair, minecraft:birch_stair, minecraft:jungle_stairs, minecraft:acacia_stairs, minecraft:dark_oak_stairs | - |
| minecraft:wool | minecraft:white_wool, minecraft:orange_wool, minecraft:magenta_wool, minecraft:light_blue_wool, minecraft:yellow_wool, minecraft:lime_wool, minecraft:pink_wool, minecraft:gray_wool, minecraft:light_gray_wool, minecraft:cyan_wool, minecraft:purple_wool, minecraft:blue_wool, minecraft:brown_wool, minecraft:green_wool, minecraft:red_wool, minecraft:black_wool |
|
物品
| 标签名称 | Values | Usage |
|---|---|---|
| minecraft:banners | minecraft:white_banner, minecraft:orange_banner, minecraft:magenta_banner, minecraft:light_blue_banner, minecraft:yellow_banner, minecraft:lime_banner, minecraft:pink_banner, minecraft:gray_banner, minecraft:light_gray_banner, minecraft:cyan_banner, minecraft:purple_banner, minecraft:blue_banner, minecraft:brown_banner, minecraft:green_banner, minecraft:red_banner, minecraft:black_banner |
|
| minecraft:boats | minecraft:oak_boat, minecraft:spruce_boat, minecraft:birch_boat, minecraft:jungle_boat, minecraft:acacia_boat, minecraft:dark_oak_boat |
|
| minecraft:buttons | #minecraft:wooden_buttons, minecraft:stone_button | - |
| minecraft:carpets | minecraft:white_carpet, minecraft:orange_carpet, minecraft:magenta_carpet, minecraft:light_blue_carpet, minecraft:yellow_carpet, minecraft:lime_carpet, minecraft:pink_carpet, minecraft:gray_carpet, minecraft:light_gray_carpet, minecraft:cyan_carpet, minecraft:purple_carpet, minecraft:blue_carpet, minecraft:brown_carpet, minecraft:green_carpet, minecraft:red_carpet, minecraft:black_carpet |
|
| minecraft:doors | #minecraft:wooden_doors, minecraft:iron_door | - |
| minecraft:logs | minecraft:oak_log, minecraft:spruce_log, minecraft:birch_log, minecraft:jungle_log, minecraft:acacia_log, minecraft:dark_oak_log, minecraft:oak_bark, minecraft:spruce_bark, minecraft:birch_bark, minecraft:jungle_bark, minecraft:acacia_bark, minecraft:dark_oak_bark |
|
| minecraft:planks | minecraft:oak_planks, minecraft:spruce_planks, minecraft:birch_planks, minecraft:jungle_planks, minecraft:acacia_planks, minecraft:dark_oak_planks |
|
| minecraft:saplings | minecraft:oak_sapling, minecraft:spruce_sapling, minecraft:birch_sapling, minecraft:jungle_sapling, minecraft:acacia_sapling, minecraft:dark_oak_sapling |
|
| minecraft:stone_bricks | minecraft:stone_bricks, minecraft:mossy_stone_bricks, minecraft:cracked_stone_bricks, minecraft:chiseled_stone_bricks |
|
| minecraft:wooden_buttons | minecraft:oak_button, minecraft:spruce_button, minecraft:birch_button, minecraft:jungle_button, minecraft:acacia_button, minecraft:dark_oak_button |
|
| minecraft:wooden_doors | minecraft:oak_door, minecraft:spruce_door, minecraft:birch_door, minecraft:jungle_door, minecraft:acacia_door, minecraft:dark_oak_door |
|
| minecraft:wooden_pressure_plates | minecraft:oak_pressure_plate, minecraft:spruce_pressure_plate, minecraft:birch_pressure_plate, minecraft:jungle_pressure_plate, minecraft:acacia_pressure_plate, minecraft:dark_oak_pressure_plate |
|
| minecraft:wooden_slabs | minecraft:oak_slab, minecraft:spruce_slab, minecraft:birch_slab, minecraft:jungle_slab, minecraft:acacia_slab, minecraft:dark_oak_slab |
|
| minecraft:wooden_stairs | minecraft:oak_stair, minecraft:spruce_stair, minecraft:birch_stair, minecraft:jungle_stairs, minecraft:acacia_stairs, minecraft:dark_oak_stairs |
|
| minecraft:wool | minecraft:white_wool, minecraft:orange_wool, minecraft:magenta_wool, minecraft:light_blue_wool, minecraft:yellow_wool, minecraft:lime_wool, minecraft:pink_wool, minecraft:gray_wool, minecraft:light_gray_wool, minecraft:cyan_wool, minecraft:purple_wool, minecraft:blue_wool, minecraft:brown_wool, minecraft:green_wool, minecraft:red_wool, minecraft:black_wool |
|
历史
| release | |||||
|---|---|---|---|---|---|
| 1.13 | 17w49a | 为方块和物品添加了标签。 | |||
Added the vanilla block tags minecraft:planks and minecraft:wool. | |||||
Added the vanilla item tags minecraft:planks and minecraft:wool. | |||||
| 17w49b | Function can now be tagged. | ||||
Functions tagged in minecraft:tick now run every tick in the beginning of the tick. | |||||
Added the vanilla block tags minecraft:buttons, minecraft:carpets, minecraft:doors, minecraft:flower_pots, minecraft:logs, minecraft:saplings and minecraft:stone_bricks. | |||||
Added the vanilla item tags minecraft:buttons, minecraft:carpets, minecraft:doors, minecraft:logs, minecraft:saplings and minecraft:stone_bricks. | |||||
| 17w50a | Added the vanilla block tags minecraft:wooden_buttons and minecraft:wooden_doors.
| ||||
Added the vanilla item tags minecraft:wooden_buttons and minecraft:wooden_doors. | |||||
Updated the vanilla block and item tags minecraft:buttons and minecraft:doors to include minecraft:stone_button and minecraft:iron_door respectively. | |||||
| 18w01a | Functions tagged in minecraft:load will now run once after a (re)load.
| ||||
Added the vanilla block tag minecraft:anvil. | |||||
| 18w02a | Added the vanilla block tag minecraft:enderman_holdable. | ||||
| 18w06a | Added the vanilla block tags minecraft:banners, minecraft:wooden_pressure_plates, minecraft:wooden_slabs, and minecraft:wooden_stairs.
| ||||
Added the vanilla item tags minecraft:banners, minecraft:boats, minecraft:wooden_pressure_plates, minecraft:wooden_slabs, and minecraft:wooden_stairs. | |||||
漏洞
Template:Issue list
| 版本 | |||||||
|---|---|---|---|---|---|---|---|
| 开发周期 |
| ||||||
| 技术 |
| ||||||
| 多人游戏 | |||||||
| 游戏订制 | |||||||