Add sugar cane

This commit is contained in:
2026-10-10 20:23:43 -03:00
parent f348734a41
commit bf91450a9d
5 changed files with 34 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
{
"format_version": 1,
"block": {
"id": "bworld:sugar_cane",
"name": "Sugar Cane",
"textures": {
"cross": "bworld:sugar_cane_block"
},
"model": "engine:cross",
"render_layer": "cutout",
"shape": [[1, 0, 1, 15, 16, 15]],
"mining": {
"toughness": 0.6
},
"drops": "bworld:sugar_cane",
"item": false,
"place_on": ["bworld:dirt", "bworld:sand", "bworld:sugar_cane"],
"components": {
"bworld:growable_block": {
"block_id": "bworld:sugar_cane",
"days": 1,
"max_height": 4
}
}
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"format_version": 1,
"item": {
"id": "bworld:sugar_cane",
"texture": "bworld:sugar_cane",
"places": "bworld:sugar_cane"
}
}
-1
View File
@@ -804,7 +804,6 @@ interface GrowableBlockParams {
function register_growable_block(ctx: ServerContext) {
ctx.components.register_block<GrowableBlockParams>("bworld:growable_block", {
on_new_day(block, params, day) {
console.log(ctx.world.get_block(block.x, block.y + 1, block.z));
if (ctx.world.get_block(block.x, block.y + 1, block.z) !== "bworld:air") {
return;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B