User Tools

Site Tools


zh_cn:tutorial:directionalblock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
zh_cn:tutorial:directionalblock [2020/11/12 13:41] – created solidblockzh_cn:tutorial:directionalblock [2022/02/28 00:56] solidblock
Line 46: Line 46:
 ==== 定义方块状态 ==== ==== 定义方块状态 ====
  
-polished_andesite_side_block.json + 
-<code>+<code javascript src/main/resources/assets/tutorial/blockstates/polished_andesite_side_block.json>
 { {
   "variants": {   "variants": {
-    "facing=north": { "model": "bitmod:block/polished_andesite_side_block" }, +    "facing=north": { "model": "bitmod:block/polished_andesite_side_block", "uvlock": true }, 
-    "facing=east":  { "model": "bitmod:block/polished_andesite_side_block", "y":  90}, +    "facing=east":  { "model": "bitmod:block/polished_andesite_side_block", "y":  90, "uvlock": true }, 
-    "facing=south": { "model": "bitmod:block/polished_andesite_side_block", "y": 180 }, +    "facing=south": { "model": "bitmod:block/polished_andesite_side_block", "y": 180, "uvlock": true }, 
-    "facing=west":  { "model": "bitmod:block/polished_andesite_side_block", "y": 270 }+    "facing=west":  { "model": "bitmod:block/polished_andesite_side_block", "y": 270, "uvlock": true }
   }   }
 } }
Line 62: Line 62:
  
  
-side.json +<code javascript src/main/resources/assets/tutorial/models/block/side.json>
-<code>+
 {   "parent": "block/block", {   "parent": "block/block",
     "textures": {     "textures": {
Line 72: Line 71:
             "to": [  16, 16, 8 ],             "to": [  16, 16, 8 ],
             "faces": {             "faces": {
-                "down": "uv": [ 0, 8, 16, 16 ], "texture": "#bottom", "cullface": "down" }, +                "down":  { "texture": "#bottom", "cullface": "down" }, 
-                "up":    { "uv": [ 0, 8, 16, 16 ], "texture": "#top",    "cullface": "up" }, +                "up":    { "texture": "#top",    "cullface": "up" }, 
-                "north":"uv": [ 0, 0, 16, 16 ], "texture": "#side",   "cullface": "north" }, +                "north": { "texture": "#side",   "cullface": "north" }, 
-                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#side },+                "south": { "texture": "#side"  "cullface": "south" },
                 "west":  { "texture": "#side",   "cullface": "west" },                 "west":  { "texture": "#side",   "cullface": "west" },
                 "east":  { "texture": "#side",   "cullface": "east" }                 "east":  { "texture": "#side",   "cullface": "east" }
Line 84: Line 83:
 </code> </code>
  
-polished_andesite_side_block.json +<code javascript src/main/resources/assets/tutorial/models/block/polished_andesite_side_block.json>
-<code>+
 { {
-    "parent": "bitmod:block/side",+    "parent": "tutorial:block/side",
     "textures": {     "textures": {
         "bottom": "block/polished_andesite",         "bottom": "block/polished_andesite",
zh_cn/tutorial/directionalblock.txt · Last modified: 2022/12/16 02:09 by solidblock