|
|
163行目: |
163行目: |
| | | |
| ==Block Model 解説== | | ==Block Model 解説== |
− | *既存のparentとtexturesの指定
| |
| | | |
− |
| |
− | *Base
| |
− | {|
| |
− | ! parent
| |
− | ! all
| |
− | ! bottom
| |
− | ! top
| |
− | ! side
| |
− | ! end
| |
− | ! cross
| |
− | ! particle
| |
− | ! down
| |
− | ! up
| |
− | ! north
| |
− | ! east
| |
− | ! south
| |
− | ! west
| |
− | ! front
| |
− | |-
| |
− | |block/cube_all ||o|| || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/cube_top || || ||o||o|| || ||o|| || || || || || ||
| |
− | |-
| |
− | |block/cube_bottom_top || ||o||o||o|| || ||o|| || || || || || ||
| |
− | |-
| |
− | |block/cube || || || || || || ||o||o||o||o||o||o||o||
| |
− | |-
| |
− | |block/cube_column || || || ||o||o|| || || || || || || || ||
| |
− | |-
| |
− | |block/cube_mirrored_all ||o|| || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/column_side || || || ||o||o|| || || || || || || || ||
| |
− | |-
| |
− | |block/cross || || || || || ||o||?|| || || || || || ||
| |
− | |-
| |
− | |block/orientable || || ||o||o|| || || || || || || || || ||o
| |
− | |-
| |
− | |block/orientable_vertical|| || || ||o|| || || || || || || || || ||o
| |
− | |-
| |
− | |block/leaves ||o|| || || || || || || || || || || || ||
| |
− | |-
| |
− | |}
| |
− |
| |
− | *Door/Fence/Wall/Rail
| |
− | {|
| |
− | ! bottom
| |
− | ! top
| |
− | ! side
| |
− | ! texture
| |
− | ! rail
| |
− | ! wall
| |
− | !
| |
− | |-
| |
− | |block/door_bottom ||o||o|| || ||
| |
− | |-
| |
− | |block/door_bottom_rh ||o||o|| || ||
| |
− | |-
| |
− | |block/door_top ||o||o|| || ||
| |
− | |-
| |
− | |block/door_top_rh ||o||o|| || ||
| |
− | |-
| |
− | |block/fence_gate_closed || || ||o|| ||
| |
− | |-
| |
− | |block/fence_gate_open || || ||o|| ||
| |
− | |-
| |
− | |block/fence_gate_inventory|| || ||o|| ||
| |
− | |-
| |
− | |block/fence_n || || ||o|| ||
| |
− | |-
| |
− | |block/fence_ne || || ||o|| ||
| |
− | |-
| |
− | |block/fence_ns || || ||o|| ||
| |
− | |-
| |
− | |block/fence_nse || || ||o|| ||
| |
− | |-
| |
− | |block/fence_nsew || || ||o|| ||
| |
− | |-
| |
− | |block/fence_post || || ||o|| ||
| |
− | |-
| |
− | |block/wall_gate_closed || || ||o|| ||
| |
− | |-
| |
− | |block/wall_gate_open || || ||o|| ||
| |
− | |-
| |
− | |block/wall_inventory || || || || ||o
| |
− | |-
| |
− | |block/wall_n || || || || ||o
| |
− | |-
| |
− | |block/wall_ne || || || || ||o
| |
− | |-
| |
− | |block/wall_ns || || || || ||o
| |
− | |-
| |
− | |block/wall_ns_above || || || || ||o
| |
− | |-
| |
− | |block/wall_nse || || || || ||o
| |
− | |-
| |
− | |block/wall_nsew || || || || ||o
| |
− | |-
| |
− | |block/wall_post || || || || ||o
| |
− | |-
| |
− | |block/rail_flat || || || ||o||
| |
− | |-
| |
− | |block/rail_raised_ne || || || ||o||
| |
− | |-
| |
− | |block/rail_raised_sw || || || ||o||
| |
− | |-
| |
− | |block/rail_raised_sw || || || ||o||
| |
− | |-
| |
− | |block/trapdoor_bottom || || ||o|| ||
| |
− | |-
| |
− | |block/trapdoor_open || || ||o|| ||
| |
− | |-
| |
− | |block/trapdoor_top || || ||o|| ||
| |
− | |-
| |
− | |}
| |
− |
| |
− |
| |
− | *Door/Fence
| |
− | {|
| |
− | ! parent
| |
− | ! all
| |
− | ! bottom
| |
− | ! top
| |
− | ! side
| |
− | ! texture
| |
− | ! end
| |
− | ! cross
| |
− | ! rail
| |
− | ! particle
| |
− | ! body
| |
− | ! edge
| |
− | ! pane
| |
− | ! wool
| |
− | ! crop
| |
− | ! wall
| |
− | ! front
| |
− | ! dirt
| |
− | ! fire
| |
− | ! plant
| |
− | ! overlay
| |
− | ! torch
| |
− | ! stem
| |
− | ! upperstem
| |
− | ! inside
| |
− | ! unsticky
| |
− | ! platform
| |
− | !
| |
− | |-
| |
− | |block/inner_stairs || ||o||o||o|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/outer_stairs || ||o||o||o|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/stairs || ||o||o||o|| || || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/anvil || || ||o|| || || || || ||o||o|| || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pane_n || || || || || || || || || || ||o||o|| || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pane_ne || || || || || || || || || || ||o||o|| || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pane_ns || || || || || || || || || || ||o||o|| || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pane_nse || || || || || || || || || || ||o||o|| || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pane_nesw || || || || || || || || || || ||o||o|| || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/carpet || || || || || || || || ||o|| || || ||o|| || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/crop || || || || || || || || ||o|| || || || ||o|| || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/tallgrass || || || || || || ||o|| || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/farmland || || ||o|| || || || || ||o|| || || || || || || ||o|| || || || || || || || || || ||
| |
− | |-
| |
− | |block/flower_pot_cross || || || || || || || || || || || || || || || || || || ||o|| || || || || || || || ||
| |
− | |-
| |
− | |block/grass || ||o||o||o|| || || || ||o|| || || || || || || || || || ||o|| || || || || || || ||
| |
− | |-
| |
− | |block/half_slab || ||o||o||o|| || || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pressure_plate_down || || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pressure_plate_inventory|| || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/pressure_plate_up || || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/torch || || || || || || || || || || || || || || || || || || || || ||o|| || || || || || ||
| |
− | |-
| |
− | |block/torch_wall || || || || || || || || || || || || || || || || || || || || ||o|| || || || || || ||
| |
− | |-
| |
− | |block/stem_fruit || || || || || || || || || || || || || || || || || || || || || ||o||o|| || || || ||
| |
− | |-
| |
− | |block/stem_growth0 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth1 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth2 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth3 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth4 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth5 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth6 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/stem_growth7 || || || || || || || || || || || || || || || || || || || || || ||o|| || || || || ||
| |
− | |-
| |
− | |block/rail_curved || || || || || || || ||o|| || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/piston_extended || ||o||o|| || || || || || || || || || || || || || || || || || || || ||o|| || || ||
| |
− | |-
| |
− | |block/piston_head || || || ||o|| || || || || || || || || || || || || || || || || || || || ||o||o|| ||
| |
− | |-
| |
− | |block/piston_head_short || || || ||o|| || || || || || || || || || || || || || || || || || || || | o||o|| ||
| |
− | |-
| |
− | |block/piston || ||o|| ||o|| || || || || || || || || || || || || || || || || || || || || ||o|| ||
| |
− | |-
| |
− | |block/button || || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/button_inventory || || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/button_pressed || || || || ||o|| || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |block/upper_slab || ||o||o||o|| || || || || || || || || || || || || || || || || || || || || || || ||
| |
− | |-
| |
− | |}
| |
− |
| |
− |
| |
− | *Fire
| |
− | {|
| |
− | ! parent
| |
− | ! particle
| |
− | ! fire
| |
− | !
| |
− | |-
| |
− | |block/fire_floor||o||o
| |
− | |-
| |
− | |block/fire_n||o||o
| |
− | |-
| |
− | |block/fire_n_flip||o||o
| |
− | |-
| |
− | |block/fire_ne||o||o
| |
− | |-
| |
− | |block/fire_ne_flip||o||o
| |
− | |-
| |
− | |block/fire_neu1||o||o
| |
− | |-
| |
− | |block/fire_neu1_flip||o||o
| |
− | |-
| |
− | |block/fire_neu2||o||o
| |
− | |-
| |
− | |block/fire_neu2_flip||o||o
| |
− | |-
| |
− | |block/fire_ns||o||o
| |
− | |-
| |
− | |block/fire_ns_flip||o||o
| |
− | |-
| |
− | |block/fire_nse||o||o
| |
− | |-
| |
− | |block/fire_nse_flip||o||o
| |
− | |-
| |
− | |block/fire_nseu1||o||o
| |
− | |-
| |
− | |block/fire_nseu1_flip||o||o
| |
− | |-
| |
− | |block/fire_nseu2||o||o
| |
− | |-
| |
− | |block/fire_nseu2_flip||o||o
| |
− | |-
| |
− | |block/fire_nsew||o||o
| |
− | |-
| |
− | |block/fire_nsew_flip||o||o
| |
− | |-
| |
− | |block/fire_nsewu1||o||o
| |
− | |-
| |
− | |block/fire_nsewu1_flip||o||o
| |
− | |-
| |
− | |block/fire_nsewu2||o||o
| |
− | |-
| |
− | |block/fire_nsewu2_flip||o||o
| |
− | |-
| |
− | |block/fire_nsu1||o||o
| |
− | |-
| |
− | |block/fire_nsu1_flip||o||o
| |
− | |-
| |
− | |block/fire_nsu2||o||o
| |
− | |-
| |
− | |block/fire_nsu2_flip||o||o
| |
− | |-
| |
− | |block/fire_nu1||o||o
| |
− | |-
| |
− | |block/fire_nu1_flip||o||o
| |
− | |-
| |
− | |block/fire_nu2||o||o
| |
− | |-
| |
− | |block/fire_nu2_flip||o||o
| |
− | |-
| |
− | |block/fire_u1||o||o
| |
− | |-
| |
− | |block/fire_u1_flip||o||o
| |
− | |-
| |
− | |block/fire_u2||o||o
| |
− | |-
| |
− | |block/fire_u2_flip||o||o
| |
− | |-
| |
− | |}
| |
| | | |
| ==Item Model解説== | | ==Item Model解説== |
前書き
1.8より、ブロック、アイテムのテクスチャ・モデルを外部ファイルから指定するようになった。
テクスチャ・モデル指定ファイルはリソースパックにより置換可能であり、形式もリソースパックと同様である。
ここでは、テクスチャ・モデル指定ファイルのサンプル及び記述形式を掲載する。
シチュエーション別必要ファイル
blockSampleA.json(Texture/BlockState/Block Model/Item Model)
blockSampleB.json(BlockState/Item Model)
blockSampleC.json(Texture/BlockState/(Block Model)/(Item Model))
itemSampleA.json(Texture/Item Model)
BlockState
/src/main/resources/assets/<domain>/blockstates/<blockname>.json
- 通常ブロック(blockSampleA.json)
モデルはblockSampleA(/src/main/resources/assets/<domain>/models/block/blockSampleA.json)を適用。
{
"variants": {
"normal": { "model": "samplemod:blockSampleA" }
}
}
- 既存モデルブロック(blockSampleB.json)
モデルは既存モデルのガラス(minecraft:glass)を適用。
{
"variants": {
"normal": { "model": "glass" }
}
}
- プロパティブロック(blockSampleC.json)
blockSampleCのBlockStateはPropertyInteger「"meta"」を持つ必要がある。
モデルは"meta"が0の場合blockSampleA、"meta"が1の場合blockSampleBを適用。
{
"variants": {
"meta=0": { "model": "samplemod:blockSampleA" }
"meta=1": { "model": "samplemod:blockSampleB" }
}
}
Block Model
/src/main/resources/assets/<domain>/models/block/<modelname>.json
- 通常ブロック(blockSampleA.json)
テクスチャはブロックの全面にblockSampleA(/src/main/resources/assets/samplemod/textures/blocks/blockSampleA.png)を適用
{
"parent": "block/cube_all",
"textures": {
"all": "samplemod:blocks/blockSampleA"
}
}
Item Model
Block: /src/main/resources/assets/<domain>/models/item/<blockmodelname>.json
Item: /src/main/resources/assets/<domain>/models/item/<itemname>.json
- 通常ブロック(blockSampleA.json)
モデルはblockSampleA(/src/main/resources/assets/samplemod/models/block/blockSampleA.json)を適用
{
"parent": "samplemod:block/blockSampleA",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}
- 既存モデルブロック(blockSampleB.json)
モデルは既存モデルのガラス(minecraft:block/glass)を適用
{
"parent": "block/glass",
"display": {
"thirdperson": {
"rotation": [ 10, -45, 170 ],
"translation": [ 0, 1.5, -2.75 ],
"scale": [ 0.375, 0.375, 0.375 ]
}
}
}
テクスチャはitemSampleA(/src/main/resources/assets/samplemod/textures/items/itemSampleA.png)を適用
{
"parent": "builtin/generated",
"textures": {
"layer0": "samplemod:items/itemSampleA"
},
"display": {
"thirdperson": {
"rotation": [ 0, 90, -35 ],
"translation": [ 0, 1.25, -3.5 ],
"scale": [ 0.85, 0.85, 0.85 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}
BlockState 解説
・プロパティなしのブロックの場合
"normal": { "model": "<domain>:<blockname>" }
・プロパティありのブロックの場合
"<prop>=<value>": { "model": "<domain>:<blockname>" }
・<blockname>
「assets/minecraft/models/block/<blockname>.json」を指定
・<domain>:<blockname>
「/src/main/resources/assets/<domain>/models/block/<blockname>.json」を指定
Block Model 解説
Item Model解説