内科専門医 今日もマイクラ処方中

Minecraftの医学的有効性を検証中

MENU

エンティティJSONの編集: Introduction (day251)

mobの挙動を変えるためにに、エンティティJSONの書き方を勉強していく。

Entity JSON Documentation | Microsoft Docs

1. Introduction

Entity Documentation - Entity JSON Introduction | Microsoft Docs

 

ブタのJSONでお勉強。このJSONは学習用に大分簡略化されている。

 

"format_version": "1.8.0",
  "minecraft:client_entity": {
     "description": {
       "identifier": "minecraft:pig",
       "min_engine_version": "1.8.0",
       "materials": { "default": "pig" },
       "textures": {
         "default": "textures/entity/pig/pig",
         "saddled": "textures/entity/pig/pig_saddle"
       },
       "geometry": {
         "default": "geometry.pig.v1.8"
       },
       "animations": {
         "setup": "animation.pig.setup",
         "walk": "animation.quadruped.walk",
         "look_at_target": "animation.common.look_at_target",
         "baby_transform": "animation.pig.baby_transform"
       },
       "animation_controllers": [
         { "setup": "controller.animation.pig.setup" },
         { "move": "controller.animation.pig.move" },
         { "baby": "controller.animation.pig.baby" }
       ],
       "render_controllers": [ "controller.render.pig" ],
       "locators": {
         "lead": { "head": [ 0.0, 14.0, -6.0 ] }
       },
       "spawn_egg": {
         "texture": "spawn_egg",
         "texture_index": 2
       }
     }
   }

 

1.1. identifier

ここで編集するentityを指定する。

1.2. Min_engine_version

おそらくworkする最も古いversionを指定する箇所。

1.3. Materials, Textures, Animations

名前を指定する。その名前はRender Controllers JSONで使用される。vanillaリソースパックか、自分で作ったものを使用可能。

1.4. Animation_controllers

どのアニメーションを使用するか指定する。

vanillaリソースパックか、自分で作ったものを使用可能。 

1.5. Render_controllers

Render Controllers folderにある名前と一致させる。vanillaリソースパックか、自分で作ったものを使用可能。 

1.6. locators

例えば、リードが体のどの位置につくかを指定する。

1.7. enable_attachables

鎧や武器を持てるようになる?

"enable_attachables": true

1.8. held_item_ignores_lighting

持っているものが光るかどうか。

"held_item_ignores_lighting": true

1.9. hide_armor

鎧を着ている時にそれを見えなくする。

enable_attachablesを上書きする。

1.10. Spawn Egg

色やテキスチャーを指定する。

 

"spawn_egg": {
  "base_color": "#53443E",
  "overlay_color": "#2E6854"
}

 

"spawn_egg": {
  "texture": "spawn_egg",
  "texture_index": 2
}