added bazalt_breaker + scripting fix
This commit is contained in:
parent
40987f16b6
commit
5569bd711e
@ -1,27 +1,30 @@
|
|||||||
{
|
{
|
||||||
"blocks": [
|
"items": [
|
||||||
"dirt",
|
"bazalt_breaker"
|
||||||
"grass_block",
|
],
|
||||||
"lamp",
|
"blocks": [
|
||||||
"glass",
|
"dirt",
|
||||||
"planks",
|
"grass_block",
|
||||||
"wood",
|
"lamp",
|
||||||
"leaves",
|
"glass",
|
||||||
"stone",
|
"planks",
|
||||||
"water",
|
"wood",
|
||||||
"sand",
|
"leaves",
|
||||||
"bazalt",
|
"stone",
|
||||||
"grass",
|
"water",
|
||||||
"flower",
|
"sand",
|
||||||
"brick",
|
"bazalt",
|
||||||
"metal",
|
"grass",
|
||||||
"rust",
|
"flower",
|
||||||
"red_lamp",
|
"brick",
|
||||||
"green_lamp",
|
"metal",
|
||||||
"blue_lamp",
|
"rust",
|
||||||
"pane",
|
"red_lamp",
|
||||||
"pipe",
|
"green_lamp",
|
||||||
"lightbulb",
|
"blue_lamp",
|
||||||
"torch"
|
"pane",
|
||||||
]
|
"pipe",
|
||||||
|
"lightbulb",
|
||||||
|
"torch"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
4
res/content/base/items/bazalt_breaker.json
Normal file
4
res/content/base/items/bazalt_breaker.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"icon-type": "sprite",
|
||||||
|
"icon": "items:bazalt_breaker"
|
||||||
|
}
|
||||||
3
res/content/base/scripts/bazalt_breaker.lua
Normal file
3
res/content/base/scripts/bazalt_breaker.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function on_block_break_by(x, y, z, p)
|
||||||
|
set_block(x, y, z, 0, 0)
|
||||||
|
end
|
||||||
BIN
res/content/base/textures/items/bazalt_breaker.png
Normal file
BIN
res/content/base/textures/items/bazalt_breaker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 672 B |
@ -260,7 +260,7 @@ void PlayerController::updateInteraction(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lclick) {
|
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))
|
if (scripting::on_item_break_block(player, item, x, y, z))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user