From 2331ccf9b4236136767fdf876a1f5b82c44f52b7 Mon Sep 17 00:00:00 2001 From: upsilon Date: Tue, 17 Jan 2017 19:09:30 +0100 Subject: [PATCH] Drop arrow: put the itemstack back to the inventory only in non-creative mode --- registration.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registration.lua b/registration.lua index c96cefe..e2d74db 100644 --- a/registration.lua +++ b/registration.lua @@ -173,7 +173,9 @@ if get_setting("drop_arrow") then minetest.item_drop(ItemStack(data.itemstack), hitter, last_pos) end, on_hit_fails = function(_, thrower, data) - thrower:get_inventory():set_stack("main", data.index, data.itemstack) + if not minetest.setting_getbool("creative_mode") then + thrower:get_inventory():set_stack("main", data.index, data.itemstack) + end end }) end