Try   HackMD

24w09a+ 組件列表

內容來自 Discord使用者flesyz0169


基本物品寫法

<物品ID>[<物品屬性>=<屬性值>]{<物品標籤>}

  • {<物品標籤>} 等同於 [custom_data={<物品標籤>}]

物品堆疊格式

舊:{id: "stone", Count: 3, tag: {...}}
新:{id: "stone", count: 3, components: {...}}

  • count-非必填,且在預設值 (1) 的時候會被省略
  • components-取代原有的 tag,裡面帶有物品屬性與物品標籤
    • 在其存入 !<物品屬性>:{} 可將該屬性移除
  • 此格式不支援空堆疊,即空氣或 count 為 0 的物品
    • 若有,此格式將會被省略
    • 在某些需要物品堆疊清單的時候會以空項目 {} 來表示

物品屬性

custom_data

  • 自訂標籤
    • 舉例:custom_data={name: "value"}

repair_cost

  • 修復代價,用在鐵砧上
    • 原標籤:RepairCost
    • 只接受非負整數,隱性預設值:0
    • 舉例:repair_cost=12

unbreakable

  • 無法破壞
    • 原標籤:Unbreakable
    • 可讀描述:
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±4>
    • 舉例:unbreakable={}

enchantments

  • 附魔
    • 原標籤:Enchantments
    • 可讀描述:
      • <附魔名稱><附魔等級> 為一組,並存入 levels 項目中
        • <附魔名稱>-只接受字串
        • <附魔等級>-只接受非負整數, 範圍:0 - 255
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±1>
    • 舉例:enchantments={levels: {'efficiency': 5}}
    • 隱性預設值:{levels: {}}

stored_enchantments

  • 持有附魔,用在附魔書上
    • 原標籤:StoredEnchantments
    • 可讀描述:
      • levels-請參照enchantmentslevels
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±32>
    • 舉例:stored_enchantments={levels: {'mending': 1}}
    • 在附魔書上的隱性預設值:{levels: {}}

custom_name

  • 道具名稱
    • 原標籤:display.Name
    • 只接受JSON文字
    • 舉例:custom_name='["道具名稱"]'

lore

  • 道具描述
    • 原標籤:display.Lore
    • 清單內只接受JSON文字,隱性預設值:[]
    • 舉例:lore=['["一段描述"]', '{"text": "另一段描述", "color": "red"}']

can_break

  • 可破壞的方塊
    • 原標籤:CanDestroy
      • 原標籤只能選擇方塊名稱, 不能指定細節
    • 可讀描述:
      • predicates-用於偵測方塊細節
        • blocks-可破壞的方塊,只接受方塊/方塊清單/方塊標籤
          • 可單獨拉出,變成只偵測一般方塊
        • nbt-符合的方塊資料({}
        • state-符合的方塊屬性([]
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±8>
    • 舉例
      1. can_break={predicates: {blocks: 'furnance', state: {facing: 'north'}}}
      2. can_break={blocks: 'stone'}

can_place_on

  • 可放置於何種方塊
    • 原標籤:CanPlaceOn
      • 原標籤只能選擇方塊名稱, 不能指定細節
    • 可讀描述:
      • predicates-請參照can_breakpredicates
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±16>
    • 舉例
      1. can_place_on={predicates: {blocks: 'furnance', state: {facing: 'north'}}}
      2. can_place_on={blocks: 'stone'}

dyed_color

  • 可染色道具上的顏色
    • 原標籤:display.color
    • 可讀描述:
      • rgb-只接受RGB整數
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±64>
    • 舉例:dyed_color={rgb: 16711680}

attribute_modifiers

  • 屬性修改器
    • 原標籤:AttributeModifiers
    • 可讀描述:
      • modifiers-修改器清單
        • type-屬性ID,用單引號字串
        • slot-使用欄位,用單引號字串,非必填,以下擇一
          • any(任意, 預設值)
          • hand(雙手)/mainhand(慣用手)/offhand(副手)
          • armor(裝備欄)/head(頭)/chest(胸)/legs(腿)/feet(腳)
        • uuid-UUID,只接受4個整數的陣列
        • name-會寫在物品上面的屬性名稱
        • amount-修改值,接受雙精浮點數
        • operation-修改方式,以下擇一
          • add_value-加算
          • add_multiplied_base-以基值乘算
          • add_multiplied_total-以總值乘算
        • show_in_tooltip - 是否顯示於物品描述上,非必填,只接受 truefalse,預設為 true
          • 原標籤: HideFlags:<±2>
    • 舉例:attribute_modifiers={modifiers: [{type: 'generic.attack_damage', uuid: [1, 2, 3, 4], name: '很痛', amount: 2.0, operation: 'add_multiplied_base'}]}

charged_projectiles

  • 存放於弩上的投射物
    • 原標籤:Charged ChargedProjectiles
    • 清單內只接受物品格式,且不再限制最多3個
    • 舉例:charged_projectiles=[{id: 'arrow'}]

intangible_projectile

  • 使投射物在非創造模式下撿不起來
    • 只存在於弩裡面的投射物
    • 只存在空值

bundle_contents

  • 束口袋內的物品欄
    • 原標籤:Items
    • 清單內只接受物品格式
    • 將此項移除會使其無法將道具放入
    • 舉例:bundle_contents=[{id:'poisonous_potato'}]
    • 在束口袋上的隱性預設值:[]

map_color

  • 地圖(物品)的裝飾色
    • 原標籤:display.MapColor
    • 只接受 RGB 整數值
    • 舉例:map_color=16711680

map_decorations

  • 地圖顯示上的記號, 常用於探險家地圖上
    • 原標籤:Decorations
    • 只接受項目組,可自訂顯示名稱
    • 可讀描述:
      • type:記號種類,以下擇一
        • player(玩家/色白箭頭)/frame(展示框/綠色箭頭)/red_marker(紅色箭頭)/blue_marker(藍色箭頭)
        • target_x(白色叉叉)/target_point(紅色地標)/red_x(紅色叉叉)
        • player_off_map(地圖外的附近玩家)/player_off_limits(離地圖外超遠的玩家)
        • mansion(森林大宅)/monument(海底神殿)
        • banner_<color>(旗幟,共16種顏色)/village_<biome>(村莊,共6種生態域)
        • swamp_hut(沼澤小屋)
      • x:橫向座標,接受浮點數
      • z:縱向座標,接受浮點數
      • rotation:順時針朝向,接受單精度浮點數
    • 舉例:map_decorations={'顯示名稱': {type: 'target_x', x: 123.0, z: -45.0, rotation: 0.0f}}
    • 在地圖上的隱性預設值:{}

map_id

  • 地圖共享編號
    • 原標籤:map
    • 只接受非負整數值
    • 舉例:map_id=1

custom_model_data

  • 自訂模型的顯示編號,常與資源包互相配合
    • 原標籤:CustomModelData
    • 只接受整數值
    • 舉例:custom_model_data=-1

potion_contents

  • 用於藥水或藥水箭矢上的效果
    • 原標籤:PotionCustomPotionColorcustom_potion_effects
    • 可讀描述:
      • potion-只接受效果藥水 ID,非必填
      • custom_color-只接受 RGB 整數值,非必填
        • 會覆蓋原有顏色
      • custom_effects-自訂藥水效果,可省略,預設為 []
        • 藥水效果會與 potion 疊加
    • 舉例
      1. potion_contents={potion: 'invisibility', custom_color: 16711680}
      2. potion_contents={custom_potion_effects: [{id: 'instant_damage', amplifier: 3}]}

writable_book_content

  • 書與鵝毛筆中書寫的內容
    • 原標籤:pagesfiltered_pages
    • pages 清單中只接受純文字或下列項目:
      • text-一般字串
      • filtered-過濾字串,非必填
    • 舉例:writable_book_content={pages: [{text:'Hello world!'}]}
    • 在書與鵝毛筆上的隱性預設值:{pages: []}

written_book_content

  • 完成的書裡面的書寫內容
    • 原標籤:pagesfiltered_pagestitlefiltered_titleauthorgenerationresolved
    • 以項目寫入清單中
    • 可讀描述:
      • pages-書頁內容,請參照writtable_book_contentpages
        • 而本 pages 的內容可接受JSON文字
      • title-書名,只接受純文字
      • author-作者,通常以玩家ID儲存
      • generation-原作/複本/複本的複本,只接受整數,範圍:0 - 2
      • resolved-是否被解析過JSON文字(目標選擇器,分數等)
        • 寫入 false 時,玩家一打開就會開始解析
    • 舉例:written_book_contents={pages: [{text: 'Hello world!'}], title: {text: 'A delightful read'}, author: 'Herobrine', generation: 1, resolved: true}

trim

  • 盔甲紋樣
    • 原標籤:Trim
    • 不再限制於帶有#trimmable_armor的物品
    • 可讀描述:
      • pattern-模板 ID
      • material-素材 ID
      • show_in_tooltip-是否顯示於物品描述上
        • 非必填,只接受 truefalse,預設為 true
        • 原標籤:HideFlags:<±128>
    • 舉例:trim={pattern: 'silence', material: 'redstone'}

suspicious_stew

  • 可疑燉湯的附加狀態
    • 原標籤:effects
    • 可讀描述:
      • id:狀態 ID
      • duration:持續時間,只接受非負整數值,非必填,預設為 160
    • 舉例:suspicious_stew=[{id: 'poison'}]
    • 在可疑燉湯上的隱性預設值:[]

hide_additional_tooltip

  • 隱藏其他來自物品本身的物品描述
    • 原標籤:HideFlags:<+32>
    • 只存在空值

debug_stick_state

  • 用於除錯棒上, 存放選擇的方塊屬性
    • 原標籤:DebugProperty
    • 以方塊 ID 與其狀態存入
    • 舉例:debug_stick_state={'turtle_egg': 'eggs', 'furnace': 'facing'}
    • 在除錯棒上的隱性預設值:{}

entity_data

  • 用於生怪蛋或生怪磚上, 存放未生成的實體與其NBT
    • 原標籤:EntityTag
    • 可讀描述:
      • id-實體 ID,必填
      • 其他項目請參照實體寫法
    • 舉例:entity_data={id: 'pig', Health: 1.0f}

bucket_entity_data

  • 用於有存入生物的桶子, 存放未生成的實體
    • 原標籤:NoAISilentNoGravityGlowingInvulnerableHealthAgeVariantHuntingCooldownBucketVariantTag
    • 只接受上述標籤
    • 舉例:bucket_entity_data={NoAI: 1, Age: 43}

instrument

  • 山羊角的樂器種類
    • 原標籤:instrument
    • 只接受樂器 ID
    • 舉例:instrument='ponder_goat_horn'

recipes

  • 在知識之書中存放配方
    • 原標籤:Recipes
    • 只接受配方 ID
    • 舉例:recipes=['minecraft:acacia_boat', 'minecraft:anvil']
    • 在知識之書上的隱性預設值:[]

lodestone_tracker

  • 在羅盤上標記磁石位置
    • 原標籤:LodestonePos LodestoneDimension LodestoneTracked
    • 可讀描述:
      • target
        • pos-只接受座標整數陣列
        • dimension-只接受世界維度 ID
      • tracked-磁石狀態追蹤,可省略,預設為 true
        • 寫入true時,磁石被打掉時會移除整個屬性
    • 舉例:lodestone_tracker={target:{pos: [13, 64, -43], dimension: 'the_nether'}}

firework_explosion

  • 在火藥球上存放爆炸方式
    • 原標籤:Explosion.TypeExplosion.ColorsExplosion.FadeColorsExplosion.TrailExplosion.Flicker
    • 可讀描述:
      • shape-爆炸形狀,以下擇一
        • small_ball(小型球狀)/large_ball(大型球狀)/star(星型)/creeper(苦力帕型)/burst(爆裂)
      • colors-初始顏色,只接受 RGB 整數陣列,預設為 []
      • fade_colors-漸變顏色,只接受 RGB 整數陣列,可省略,預設為 []
      • has_trail-是否帶有蹤跡,可省略,預設值為 false
      • has_twinkle-是否帶有閃爍,可省略,預設值為 false
        • Explosion.Flicker 中更名
    • 舉例:firework_explosion={shape: 'large_ball', colors: [16711680], has_trail: true}

fireworks

  • 在煙火上存放爆炸方式與飛行時間
    • 原標籤:Fireworks.Explosions Fireworks.Flight
    • 可讀描述:
      • explosions-清單只接受爆炸方式,請參照firework_explosion
      • flight_duration-飛行時間,等同於製作煙火時用的火藥數量,接受位元組
    • 舉例:fireworks={explosions: [{shape: 'large_ball', colors: [16711680], has_trail: true}], flight_duration: 2}

profile

  • 在玩家頭顱中存放玩家皮膚
    • 放置時會將資料複製到方塊中
    • 原標籤:SkullOwner
    • 可讀描述:
      • name-玩家 ID, 只接受字串
        • 抓到特定玩家會自動解析成整個內容,包含玩家UUID與皮膚資料
      • id-玩家 UUID,非必填
      • properties-玩家的附屬資料,非必填
        • name-所有物的名稱(如 textures),以字串存入
        • value-材質資料,以被 base64 加密過後的字串存入
        • signature-以字串存入,可省略
    • 舉例:profile={name: 'MHF_Sheep'}

note_block_sound

  • 在音階盒上方放置玩家頭顱後能夠觸發的聲音事件
    • 放置時會將資料複製到方塊中
    • 原標籤:BlockEntityTag.note_block_sound
    • 只接受聲音事件 ID
    • 舉例:note_block_sound='minecraft:ambient.cave'

base_color

  • 存放盾牌的底色
    • 原標籤:BlockEntityTag.Base
    • 只接受下列字串,以下擇一
      • whiteorangemagentalight_blueyellowlimepinkgray
      • light_graycyanpurplebluebrowngreenredblack
    • 舉例:base_color='magenta'
  • 存放旗幟或盾牌上的圖樣
    • 原標籤:BlockEntityTag.Patterns
    • 放置時會將資料複製到方塊中
    • 清單內只接受下列項目:
      • pattern-旗幟圖樣 ID, 不再以簡寫方式呈現(見表一
      • color-圖樣顏色,請參照base_color
    • 舉例:banner_patterns=[{pattern: 'minecraft:stripe_top', color: 'red'}]

pot_decorations

  • 存放於飾紋陶罐上陶器碎片種類
    • 放置時會將資料複製到方塊中
    • 原標籤:BlockEntityTag.sherds
    • 清單內只接受紅磚頭與陶器碎片種類 ID
    • 舉例:pot_decorations=['arms_up_pottery_sherd', 'angler_pottery_sherd', 'danger_pottery_sherd', 'shelter_pottery_sherd']
    • 在飾紋陶罐上的預設值:['brick', 'brick', 'brick', 'brick']

container

  • 存放於界伏盒上的物品內容
    • 放置時會將資料複製到方塊中
    • 原標籤:BlockEntityTag.Items
    • 清單內只接受下列項目:
      • slot-欄位,只接受整數,範圍:0 - 255
      • item-物品格式
    • 舉例:container=[{slot: 7, item: {id: 'diamond_pickaxe', components: {'unbreakable': {}}}}]

bees

  • 存有蜜蜂實體, 用於蜂巢或蜂箱上
    • 放置時會將資料複製到方塊上
    • 原標籤:BlockEntityTag:Bees
    • 清單內只接受下列項目:
      • entity_data-實體資料,請參照entity_data的可讀項目
      • ticks_in_hive-只接受整數值
      • min_ticks_in_hive-只接受整數值
    • 舉例:bees=[{entity_data: {id: 'minecraft:bee'}, ticks_in_hive: 3, min_ticks_in_hive: 10}]
    • 在蜂巢與蜂箱上的隱藏預設值:[]

lock

  • 能將容器鎖上, 必須用物品名稱與其相符的物品才能打開
    • 放置時會將資料複製到其容器方塊上
    • 原標籤:BlockEntityTag.Lock
    • 只接受字串
    • 舉例:lock='hunter2'

block_state

  • 使其物品在放置時帶有方塊狀態
    • 取代標籤BlockStateTag
    • 以方塊的狀態名稱與其狀態值寫入
    • 舉例:block_state={eggs: '10'}

enchantment_glint_override

  • 使物品帶有附魔光澤
    • 只接受 truefalse
    • 舉例:enchantment_glint_override=true

表格

table1

旗幟圖案表

舊名稱 新名稱 舊名稱 新名稱
b minecraft:base rd minecraft:diagonal_right
bl minecraft:square_bottom_left lud minecraft:diagonal_up_left
br minecraft:square_bottom_right rud minecraft:diagonal_up_right
tl minecraft:square_top_left mc minecraft:circle
tr minecraft:square_top_right mr minecraft:rhombus
bs minecraft:stripe_bottom vh minecraft:half_vertical
ts minecraft:stripe_top hh minecraft:half_horizontal
ls minecraft:stripe_left vhr minecraft:half_vertical_right
rs minecraft:stripe_right hhb minecraft:half_vertical_bottom
cs minecraft:stripe_center bo minecraft:border
ms minecraft:stripe_middle cbo minecraft:curly_border
drs minecraft:stripe_down_right gra minecraft:gradient
dls minecraft:stripe_down_left gru minecraft:gradient_up
ss minecraft:small_stripe bri minecraft:bricks
cr minecraft:cross glb minecraft:globe
sc minecraft:straight_cross cre minecraft:creeper
bt minecraft:triangle_bottom sku minecraft:skull
tt minecraft:triangle_top flo minecraft:flower
bts minecraft:triangles_bottom moj minecraft:mojang
tts minecraft:triangle_top pig minecraft:piglin
ld minecraft:diagonal_left

Dark Theme License

The MIT License (MIT)

Copyright © 2022-2024 Lumynous

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.