added bazalt_breaker + scripting fix

This commit is contained in:
MihailRis 2024-01-13 14:07:49 +03:00
parent 40987f16b6
commit 5569bd711e
5 changed files with 37 additions and 27 deletions

View File

@ -1,27 +1,30 @@
{
"blocks": [
"dirt",
"grass_block",
"lamp",
"glass",
"planks",
"wood",
"leaves",
"stone",
"water",
"sand",
"bazalt",
"grass",
"flower",
"brick",
"metal",
"rust",
"red_lamp",
"green_lamp",
"blue_lamp",
"pane",
"pipe",
"lightbulb",
"torch"
]
}
"items": [
"bazalt_breaker"
],
"blocks": [
"dirt",
"grass_block",
"lamp",
"glass",
"planks",
"wood",
"leaves",
"stone",
"water",
"sand",
"bazalt",
"grass",
"flower",
"brick",
"metal",
"rust",
"red_lamp",
"green_lamp",
"blue_lamp",
"pane",
"pipe",
"lightbulb",
"torch"
]
}

View File

@ -0,0 +1,4 @@
{
"icon-type": "sprite",
"icon": "items:bazalt_breaker"
}

View File

@ -0,0 +1,3 @@
function on_block_break_by(x, y, z, p)
set_block(x, y, z, 0, 0)
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

View File

@ -260,7 +260,7 @@ void PlayerController::updateInteraction(){
}
if (lclick) {
if (!input.shift && item->rt.funcsset.on_use_on_block) {
if (!input.shift && item->rt.funcsset.on_block_break_by) {
if (scripting::on_item_break_block(player, item, x, y, z))
return;
}