Item drop: Tune to land exactly 2 nodes away with level view (#6410)

This commit is contained in:
Paramat 2017-09-12 23:01:50 +01:00 committed by Loïc Blot
parent 5e141ac920
commit 604fe2083d

@ -426,9 +426,9 @@ function core.item_drop(itemstack, dropper, pos)
local item = itemstack:take_item(cnt) local item = itemstack:take_item(cnt)
local obj = core.add_item(p, item) local obj = core.add_item(p, item)
if obj then if obj then
dir.x = dir.x * 2 dir.x = dir.x * 2.9
dir.y = dir.y * 2 + 2 dir.y = dir.y * 2.9 + 2
dir.z = dir.z * 2 dir.z = dir.z * 2.9
obj:set_velocity(dir) obj:set_velocity(dir)
obj:get_luaentity().dropped_by = dropper:get_player_name() obj:get_luaentity().dropped_by = dropper:get_player_name()
return itemstack return itemstack