mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add block.place(...), block.destruct(...)
This commit is contained in:
parent
8082048d39
commit
c9257ec127
5 changed files with 64 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ function on_grounded()
|
|||
local iy = math.floor(pos[2])
|
||||
local iz = math.floor(pos[3])
|
||||
if block.is_replaceable_at(ix, iy, iz) then
|
||||
block.set(ix, iy, iz, block.index(blockid))
|
||||
block.place(ix, iy, iz, block.index(blockid), 0)
|
||||
else
|
||||
local picking_item = block.get_picking_item(block.index(blockid))
|
||||
local drop = entities.spawn("base:drop", pos, {base__drop={id=picking_item, count=1}})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue