Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Advertisement
Information icon
此特性为Java版独有。
Ic translate
此条目的(部分)内容需要翻译。

你可以帮助我们来翻译此条目,但请勿使用机器翻译

Disambig gray  本文章介绍的是数据包标签。关于其他用途,请见“标签(消歧义)”。

数据包中的标签允许玩家使用JSON文件将物品方块函数组合在一起。

用途

為了使用在方塊、物品或函數標籤,JSON檔案必須分別放置於數據包的data/(命名空间)/tags/blocks, data/(命名空间)/tags/itemsdata/(命名空间)/tags/functions裡面。

方塊標籤可以在檢查方塊參數時以#(命名空间):(tag)的形式被呼叫,如果指定方塊符合任何紀錄於標籤內的方塊那麼將會輸出成功。物品標籤可以在檢查物品參數時以#(命名空间):(tag)的形式或者在配方、进度中以"tag": "(命名空间):(tag)"的形式被调用,如果指定物品符合任何紀錄於標籤內的物品那麼將會輸出成功。函數標籤可以在/function命令中以#(命名空间):(tag)的形式被调用,這將會讓多個函數依據順序分別執行。

而遊戲本身也使用了這些標籤。原版方塊標籤被用於各種方塊屬性。原版物品標籤被用於各種物品屬性、原版進度文件與原版配方文件。但是並不存在原版函數標籤,因為並不存在原版函數,但任何標記於minecraft:tick標籤的函數都會在每一刻的刻開始時執行,而被標記於minecraft:load標籤的函數則會在載入及重載時執行。

JSON格式

  • 根標籤。
    •  replace:是否這個標籤應該完全的覆蓋來自較低優先級資料包之同命名空間的同名標籤,當設定為false時則為為此標簽進行補充。預設為false
    •  values:一個物品、方塊或函數列表。將會接受同類型的其他標籤,但遞歸仍是不可能的。
      •  (命名空间):(名称):一個列表中的物品、方塊或函數元素。
      •  #(命名空间):(名称):一個列表中的物品、方塊或函數標籤,標籤必須是同種類型。

标签列表

方块

标签名称 用途
minecraft:anvil minecraft:anvil、minecraft:chipped_anvil、minecraft:damaged_anvil
  • 用来决定哪些方块能够用来打开铁砧的GUI界面。对其他方块无效,但是将默认元素移出该标签会使得GUI不出现。
  • 用来决定其下落方块形式是否伤害实体,用于死亡消息。
  • Used to determine if a block has a chance to get "damaged" or break upon landing. Adding blocks to this tag that can naturally fall will not make them have a chance to break upon landing when they fall naturally. For example adding minecraft:sand will not make falling sand blocks that are created naturally have a chance to break, but falling sand blocks summoned with a command will have a chance to break.
  • Used in reading NBT from falling block entities to set the internal hurtEntities boolean to true if the entity did not have a HurtEntities NBT key.
  • 用来决定方块是否有机会被通过铁砧GUI破损。
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_wood、minecraft:spruce_wood、minecraft:birch_wood、minecraft:jungle_wood、minecraft:acacia_wood、minecraft:dark_oak_wood
  • Used for one of the requirements for settling on a block position for the parrot wandering AI.
  • 如果该标签的方块周围有树叶,树叶方块会将其check_decay方块状态设为false。
  • 树会生长进入此标签的方块。
  • If blocks in the default village structures match blocks inside this tag, they will be replaced by either sandstone, spruce logs or acacia logs (depending on the biome).
  • Checks progress for the punch_tree tutorial step.
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:buttons。
minecraft:wooden_doors minecraft:oak_door、minecraft:spruce_door、minecraft:birch_door、minecraft:jungle_door、minecraft:acacia_door、minecraft:dark_oak_door
  • 用于标签#minecraft:doors。
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
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 300.
minecraft:boats minecraft:oak_boat, minecraft:spruce_boat, minecraft:birch_boat, minecraft:jungle_boat, minecraft:acacia_boat, minecraft:dark_oak_boat
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 200.
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
  • Used to check whether or not an item can go in the decoration slot of a llama, but items other than carpets will not change the llama visually.
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 67.
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
  • Used in various checks to either skip or progress with the "punch_tree" tutorial step.
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 300.
minecraft:planks minecraft:oak_planks, minecraft:spruce_planks, minecraft:birch_planks, minecraft:jungle_planks, minecraft:acacia_planks, minecraft:dark_oak_planks
  • Used as a last check for the repair items of a tool, which is used by wooden tools.
  • Used as a check for the repair item of shields.
  • Used in various checks to either skip or progress with the "craft_planks" tutorial step.
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 300.
  • Used in these 3 advancement files and these 32 recipe files.
minecraft:saplings minecraft:oak_sapling, minecraft:spruce_sapling, minecraft:birch_sapling, minecraft:jungle_sapling, minecraft:acacia_sapling, minecraft:dark_oak_sapling
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
minecraft:stone_bricks minecraft:stone_bricks, minecraft:mossy_stone_bricks, minecraft:cracked_stone_bricks, minecraft:chiseled_stone_bricks
  • Used in these 3 advancement files and these 2 recipe files.
minecraft:wooden_buttons minecraft:oak_button, minecraft:spruce_button, minecraft:birch_button, minecraft:jungle_button, minecraft:acacia_button, minecraft:dark_oak_button
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
  • Used in the 'buttons.json' item tag file.
minecraft:wooden_doors minecraft:oak_door, minecraft:spruce_door, minecraft:birch_door, minecraft:jungle_door, minecraft:acacia_door, minecraft:dark_oak_door
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 200.
  • Used in the 'doors.json' item tag file.
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
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 300.
minecraft:wooden_slabs minecraft:oak_slab, minecraft:spruce_slab, minecraft:birch_slab, minecraft:jungle_slab, minecraft:acacia_slab, minecraft:dark_oak_slab
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 150.
  • Used in the 'daylight_detector.json' recipe file.
minecraft:wooden_stairs minecraft:oak_stair, minecraft:spruce_stair, minecraft:birch_stair, minecraft:jungle_stairs, minecraft:acacia_stairs, minecraft:dark_oak_stairs
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 300.
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
  • Used to check if an item can go in the fuel slot of a furnace and to return a burn time of 100.
  • Used in the 'painting.json' advancement and recipe file.

历史

release
1.1317w49a为方块和物品添加了标签。
Added the vanilla block tags minecraft:planks and minecraft:wool.
Added the vanilla item tags minecraft:planks and minecraft:wool.
17w49bFunction 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.
17w50aAdded 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.
18w01aFunctions tagged in minecraft:load will now run once after a (re)load.
Added the vanilla block tag minecraft:anvil.
18w02aAdded the vanilla block tag minecraft:enderman_holdable.
18w06aAdded 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

Advertisement