Add snowball and egg to dispenser support
This commit is contained in:
parent
a9f2c705da
commit
e672abd2ed
2 changed files with 10 additions and 1 deletions
|
@ -24,7 +24,7 @@ mcl_throwing.throw = function(throw_item, pos, dir, velocity)
|
|||
velocity = 22
|
||||
end
|
||||
|
||||
local itemstring = throw_item:get_name()
|
||||
local itemstring = ItemStack(throw_item):get_name()
|
||||
local obj = minetest.add_entity(pos, entity_mapping[itemstring])
|
||||
obj:setvelocity({x=dir.x*velocity, y=dir.y*velocity, z=dir.z*velocity})
|
||||
obj:setacceleration({x=dir.x*-3, y=-GRAVITY, z=dir.z*-3})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue