教學:製作附加包

出自Minecraft基岩版开发Wiki
製作附加包
系列教學
所屬系列
難易度
中級
前置知識
實踐裝置
WindowsAndroid
所需軟體

本系列教學提供了附加包相關的製作指導,你可以在此學習關於附加包製作的入門及進階內容。

導讀[編輯]

本教學對於初學者建議按從上往下的順序閱讀。「開始之前」、「包的構建」、「執行、除錯與匯出」和「在地化」四個條目講解了製作附加包的基本所需,在了解了相關內容後也可根據實際情況選擇對應條目閱讀。

本教學中使用了一些基本例子來講解部分附加包的功能,例如自訂食物、武器、可旋轉方塊、農作物等。在對附加包製作方法比較掌握後可以根據需要查閱對應例子,初學者可選擇其一作為自己嘗試製作附加包的物件。

教學的部分內容屬於實驗性玩法,要使用相關附加包功能請開啟對應實驗性玩法。

檔案架構[編輯]

這裡列出了資源包行為包的基本架構,在製作附加包時需根據這個基本架構來建立檔案關係。

資源包[編輯]

  •  RP:頂級資料夾,建議名稱中帶有「RP」或「RES」字樣
    •  pack_icon.png:資源包圖示
    •  bug_pack_icon.png:錯誤包圖示
    •  biomes_client.json:生態域定義檔案
    •  blocks.json:方塊定義檔案
    •  contents.json:內容檔案
    •  items_offsets_client.json:物品繪製偏移用戶端定義檔案
    •  loading_messages.json:載入提示資訊文字檔
    •  manifest.json:清單檔案
    •  sounds.json:聲音定義檔案
    •  splashes.json:閃爍標語文字檔
    •  animation_controllers:用戶端動畫控制器
      •  example.animation_controller.json
    •  animations:用戶端動畫
      •  example.animation.json
    •  attachables:附著物
      •  example.attachable.json
    •  entity
      •  example.entity.json:實體用戶端定義檔案
    •  fogs
      •  example.fog.json:迷霧定義檔案
    •  font:字型
    •  items
      •  example.item.json:物品用戶端定義檔案
    •  materials:材質
      •  example.material
      •  example.json
    •  models:模型
      •  entity
        •  example.geo.json
      •  blocks
        •  example.geo.json
    •  particles:粒子
      •  example.particle.json
    •  render_controllers:繪製控制器
      •  example.render_controller.json
    •  shaders:著色器(繪製龍實裝前可用)
      •  glsl
        •  example.fragment
        •  example.vertex
        •  example.h
      •  hlsl
        •  example.fragment.hlsl
        •  example.geometry.hlsl
        •  example.vertex.hlsl
    •  sounds:聲音
      •  example.ogg:音訊檔
      •  music_definitions.json:音樂定義檔案
      •  sound_definitions.json:音效定義檔案
    •  texts:在地化文字
      •  languages.json:語言定義檔案
      •  language_names.json:語言名稱定義檔案
      •  ……
    •  textures:紋理
      •  blocks:方塊紋理
        •  example.png
      •  colormap:地圖群系繪製顏色
        •  birch.png
        •  evergreen.png
        •  ……
      •  entity:實體紋理
        •  example.entity.png
      •  environment:環境紋理
        •  clouds.png:雲貼圖
        •  destroy_stage_0.png:方塊破壞進度貼圖
        •  ……
      •  gui:圖形介面
        •  achievements
        •  new_gui
        •  ……
      •  items:物品紋理
        •  example.png
      •  map:地圖(手持)紋理
        •  map_background.png:地圖背景貼圖
        •  map_icons.png:地圖圖示貼圖
        •  player_icon_background.png
      •  misc:雜項
        •  enchanted_item_glint.png:附魔光效貼圖
        •  missing_texture.png:紋理丟失貼圖
        •  pumpkinblur.png:南瓜頭(裝備時)陰影貼圖
      •  models:盔甲模型
        •  armor
          •  chain_1.png
          •  chain_2.png
          •  ……
      •  painting:畫
        •  kz.png
      •  particle:粒子
        •  campfire_smoke.png
        •  particles.png
        •  example.png
      •  persona_thumbnails:人物角色
        •  alex_hair_thumbnail_0.png
        •  alex_pants_thumbnail_0.png
        •  ……
      •  ui:UI(使用者介面)
        •  sidebar_icons
        •  subcategory_icons
        •  5stars_empty.png
        •  ……
      •  flame_atlas.png:(實體著火時)火焰粒子貼圖
      •  forcefield_atlas.png
      •  flipbook_textures.json:翻書動畫定義檔案
      •  item_texture.json:物品紋理定義檔案
      •  terrain_texture.json:方塊紋理定義檔案
      •  textures_list.json:紋理清單檔案
    •  ui:UI
      •  realmsPlus_sections
      •  settings_sections
      •  _global_variables.json:全域變數
      •  _ui_defs.json:UI定義檔案
      •  ……

行為包[編輯]

  •  BP:頂級資料夾,建議名稱中帶有「BP」、「BEH」或「DAT」字樣
    •  animation_controllers:伺服器端動畫控制器
      •  example.ac.json
    •  animations:伺服器端動畫
      •  example.animation.json
    •  biomes:生態域
      •  example.biome.json
    •  blocks:方塊
      •  example.block.json
    •  entities:實體伺服器端定義
      •  example.entity.json
    •  features
      •  example.feature.json:地物
    •  feature_rules
      •  example.rule.json:地物規則
    •  functions:函式
      •  example.mcfunction
      •  tick.json
    •  items:物品伺服器端定義(1.16.100前)/物品定義(1.16.100後)
      •  example.item.json
    •  loot_tables:戰利品表
      •  example.loot.json
    •  manifest.json:清單檔案
    •  pack_icon.png:行為包圖示
    •  recipes:配方
      •  example.recipe.json
    •  scripts:腳本
      •  Main.js:新版腳本入口檔案
      •  client:舊版用戶端腳本
        •  example.js
      •  server:舊版伺服器端腳本
        •  example.js
    •  spawn_rules:實體生成規則
      •  example.spawn.json
    •  structures:結構
      •  example.mcstructure
    •  texts:行為包語言檔案
      •  zh_CN.lang
      •  languages.json
      •  en_US.lang
    •  trading:交易表
      •  economy_trades:村莊與掠奪後交易表
        •  example.trade.json
      •  example.trade.json:村莊與掠奪前交易表

目錄[編輯]

基礎[編輯]

主要內容[編輯]

實例[編輯]

這裡是附加包的實例,其中部分內容需要開啟實驗性玩法

物品實例[編輯]

方塊實例[編輯]

地物實例[編輯]

實體實例[編輯]

配方實例[編輯]