Added Game-Rule Drop Item

master
aBlender 2018-06-28 13:23:46 -07:00
parent 5103353714
commit 74ba2d0251
1 changed files with 20 additions and 1 deletions

21
lua.rkt
View File

@ -170,7 +170,6 @@ end"
minetest.add_entity(new_pos, entity)")
))
(define-lua-callbacks
spawn
block-punch
@ -178,6 +177,26 @@ end"
item-use
item-drop)
(define (drop wrapper)
(format
"function(item)
~a
end"
(wrapper
"local new_pos = {
x=pos.x,
y=pos.y + 1,
z=pos.z
}
minetest.add_item(new_pos, item)")
))
(define-lua-callbacks
drop
block-punch
block-use
item-use
item-drop)
(define (place-schematic wrapper)
(format