Pick up cart if sneak (shift) is pressed when punching it
parent
acf74d89b6
commit
2767b159f7
2
init.lua
2
init.lua
|
@ -57,7 +57,7 @@ function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, directi
|
|||
return
|
||||
end
|
||||
|
||||
if puncher:get_wielded_item():get_definition().type == "tool" then
|
||||
if puncher:get_player_control().sneak then
|
||||
self.object:remove()
|
||||
puncher:get_inventory():add_item("main", "carts:cart")
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue