アドオン制作講座

第一段 item追加編


動画も作ったので、良かったら見てください!

動画


注意点

・僕は、Andoroidで作っているけど、
pcなどでも作れる  
・アドオンの基本の「き」は知ってる前提で話していきます 


使用しているアプリ

・ファイルマネージャー+
・ドット絵 プロ

(・ ファイルマネージャー)


Behavior

ファイル構造
├ items 
│ └sample.json
├  manifest
├ pack_icon.png

items

{

"format_version": "1.10", 

 "minecraft:item": {

 "description": { 

itemのID(minecraft:○○以外なら何でもok)

 "identifier": "sample:item"

 },

 "components": {

 持ち方をツールのようにするか(true or false)

 "minecraft:hand_equipped": false,

 データ値の違うitem同士をスタックできるか(true or false)

 "minecraft:stacked_by_data": false,

 itemを使ってまた使えるようになるまでの時間(数字)

 "minecraft:use_duration": 32,

itemの耐久値(0の場合、無限) (数字)

 "minecraft:max_damage": 0, 

スタックできる最大個数 (数字)

 "minecraft:max_stack_size": 1,

エンチャント本のように光るか(true or false)

 "minecraft:foil": false, 

食べ物の時の設定

 "minecraft:food": { 

回復する満腹度(数字)

 "nutrition": 4, 

隠し満腹度("poor","low","normal","good","high","supernatural")

 "saturation_modifier": "supernatural",

満腹度が減っていなくても食べれるか (true or false)

 "can_always_eat": false, 

クルーダウンの種類

 "cooldown_type": "chorusfruit",

クルーダウンの時間(数字)

 "cooldown_time": 20, 

食べたときに貰えるitem

 "using_converts_to": "bowl", 

 食べた時に起こるaction名

 "on_use_action": "chorus_teleport",

テレポートの範囲

 "on_use_range": [ 8, 8, 8 ], 

食べた時につくeffect設定

 "effects": [ 

 { 

effect名 

 "name": "instant_health",

確率

 "chance": 1.0, 

時間

 "duration": 1, 

強さ 

 "amplifier": 0

 }

 ] 

 } 

 }

 }

}


Resource

ファイル構造

├ items
 │ └sample.json
├  texts
│  └ ja_JP.lang
├ textures
│ └ items
│ └ item_texture.json
├ manifest.json
├  pack_icon.png

items

{

"format_version": "1.10",

  "minecraft:item": {

"description": {

Behaviorのidentifierで書いたID 

 "identifier": "sample:item", 

アイテムの種類("Item","Nature","Construction","Equipment")
         アイテム, 性質,   建築,    所持品

 "category": "Item"

 }, 

 "components": { 

Resourceのtextureで使用

 "minecraft:icon": "sample",

右クリックをしたときに使うanimation(eat,bow,trident,crossbowなど) 

 "minecraft:use_animation": "eat", 

 レンダーのオフセット(詳しいことは、不明)

 "minecraft:render_offsets": "apple"

 }

 } 

 } 

texts

item.sample:item.name=サンプル

 
↓説明 

 sample:item...BehaviorやResourceで書いたidentifier


サンプル...itemの名前 

textures(item_texture.json)

{

"resource_pack_name":"vanilla",

 "texture_name":"atlas.items", 

 "texture_data":{

Resourceのitemsのminecraft:iconと同じにする 

 "sample":{ 

sampleの部分にtextureの名前

 "textures":"textures/items/sample"

 }

 }

}


最後に

このサイトや動画が参考になっていたら嬉しいです

中身は、コピーまたは写して使ってください
*コピーの場合、説明は消してください (説明が入ってると動かないから)

無料でホームページを作成しよう! このサイトはWebnodeで作成されました。 あなたも無料で自分で作成してみませんか? さあ、はじめよう