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.
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
27
assets/cubed/registry.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"blocks": {
|
||||||
|
"air": 0,
|
||||||
|
"grass_block": 1,
|
||||||
|
"dirt": 2,
|
||||||
|
"stone": 3,
|
||||||
|
"sand": 4,
|
||||||
|
"log": 5,
|
||||||
|
"leaf": 6,
|
||||||
|
"water": 7,
|
||||||
|
"snowy_grass_block": 8,
|
||||||
|
"grass": 9
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"air": 0,
|
||||||
|
"grass_block": 1,
|
||||||
|
"dirt": 2,
|
||||||
|
"stone": 3,
|
||||||
|
"sand": 4,
|
||||||
|
"log": 5,
|
||||||
|
"leaf": 6,
|
||||||
|
"water": 7,
|
||||||
|
"snowy_grass_block": 8,
|
||||||
|
"grass": 9,
|
||||||
|
"pig_spawn_egg": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 568 B After Width: | Height: | Size: 568 B |
|
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
|
Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 893 B |
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |