mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
refactor(cubed): migrate block definitions to JSON
Move block data from TOML to JSON under assets/cubed/blocks, add registry.json for block and item IDs, and relocate textures and sounds to the cubed namespace.
This commit is contained in:
14
assets/cubed/blocks/air.json
Normal file
14
assets/cubed/blocks/air.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "air",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": true,
|
||||
"is_passable": true,
|
||||
"is_discard": true,
|
||||
"is_blend": false,
|
||||
"is_transitional": false,
|
||||
"is_gas": true,
|
||||
"roughness": 1.0
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/dirt.json
Normal file
23
assets/cubed/blocks/dirt.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "dirt",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": true,
|
||||
"is_gas": false,
|
||||
"roughness": 1.0
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/dirt"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/dirt/break.ogg",
|
||||
"place": "cubed:sounds/blocks/dirt/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/dirt/walk.ogg"
|
||||
}
|
||||
}
|
||||
22
assets/cubed/blocks/grass.json
Normal file
22
assets/cubed/blocks/grass.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "grass",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": true,
|
||||
"is_transparent": true,
|
||||
"is_passable": true,
|
||||
"is_discard": true,
|
||||
"is_blend": false,
|
||||
"is_transitional": false,
|
||||
"is_gas": false,
|
||||
"roughness": 0.9
|
||||
},
|
||||
"texture": {
|
||||
"type": "cross",
|
||||
"path": "cubed:textures/blocks/grass"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/grass/break.ogg",
|
||||
"place": "cubed:sounds/blocks/grass/place.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/grass_block.json
Normal file
23
assets/cubed/blocks/grass_block.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "grass_block",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": true,
|
||||
"is_gas": false,
|
||||
"roughness": 0.9
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/grass_block"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/grass_block/break.ogg",
|
||||
"place": "cubed:sounds/blocks/grass_block/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/grass_block/walk.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/leaf.json
Normal file
23
assets/cubed/blocks/leaf.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "leaf",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": true,
|
||||
"is_passable": false,
|
||||
"is_discard": true,
|
||||
"is_blend": false,
|
||||
"is_transitional": false,
|
||||
"is_gas": false,
|
||||
"roughness": 0.7
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/leaf"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/leaf/break.ogg",
|
||||
"place": "cubed:sounds/blocks/leaf/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/leaf/walk.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/log.json
Normal file
23
assets/cubed/blocks/log.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "log",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": false,
|
||||
"is_gas": false,
|
||||
"roughness": 0.7
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/log"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/log/break.ogg",
|
||||
"place": "cubed:sounds/blocks/log/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/log/walk.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/sand.json
Normal file
23
assets/cubed/blocks/sand.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "sand",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": true,
|
||||
"is_gas": false,
|
||||
"roughness": 0.8
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/sand"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/sand/break.ogg",
|
||||
"place": "cubed:sounds/blocks/sand/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/sand/walk.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/snowy_grass_block.json
Normal file
23
assets/cubed/blocks/snowy_grass_block.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "snowy_grass_block",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": true,
|
||||
"is_gas": false,
|
||||
"roughness": 0.9
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/snowy_grass_block"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/snowy_grass_block/break.ogg",
|
||||
"place": "cubed:sounds/blocks/snowy_grass_block/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/snowy_grass_block/walk.ogg"
|
||||
}
|
||||
}
|
||||
23
assets/cubed/blocks/stone.json
Normal file
23
assets/cubed/blocks/stone.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "stone",
|
||||
"properties": {
|
||||
"is_liquid": false,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": false,
|
||||
"is_passable": false,
|
||||
"is_discard": false,
|
||||
"is_blend": false,
|
||||
"is_transitional": true,
|
||||
"is_gas": false,
|
||||
"roughness": 0.75
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/stone"
|
||||
},
|
||||
"sounds": {
|
||||
"break": "cubed:sounds/blocks/stone/break.ogg",
|
||||
"place": "cubed:sounds/blocks/stone/place.ogg",
|
||||
"walk": "cubed:sounds/blocks/stone/walk.ogg"
|
||||
}
|
||||
}
|
||||
18
assets/cubed/blocks/water.json
Normal file
18
assets/cubed/blocks/water.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "water",
|
||||
"properties": {
|
||||
"is_liquid": true,
|
||||
"is_cross_plane": false,
|
||||
"is_transparent": true,
|
||||
"is_passable": true,
|
||||
"is_discard": false,
|
||||
"is_blend": true,
|
||||
"is_transitional": false,
|
||||
"is_gas": false,
|
||||
"roughness": 0.02
|
||||
},
|
||||
"texture": {
|
||||
"type": "cuboid",
|
||||
"path": "cubed:textures/blocks/water"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user