aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorDS <ds.desour@proton.me>2023-03-27 20:02:23 +0200
committerGitHub <noreply@github.com>2023-03-27 20:02:23 +0200
commitea095d3f69e7aadbcdbe5294e5dfc42ba2fe93bf (patch)
tree2f5be4f1afe5c43d7eea0539eeb5eca56e95205e /doc/lua_api.txt
parent2180dc14ef802961d50d5e5f7fccd2d3a2b9f647 (diff)
downloadminetest-ea095d3f69e7aadbcdbe5294e5dfc42ba2fe93bf.tar.xz
Fix core.item_eat for same-item replace_with_item and split stacks before dropping (#13286)
The replace_with_item can be added to the slot of the wield item, which is afterwards overwritten. This causes item loss.
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index fdc8e77d8..2179f44b5 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -6082,8 +6082,8 @@ Defaults for the `on_place` and `on_drop` item definition functions
* Returns `function(itemstack, user, pointed_thing)` as a
function wrapper for `minetest.do_item_eat`.
* `replace_with_item` is the itemstring which is added to the inventory.
- If the player is eating a stack, then replace_with_item goes to a
- different spot.
+ If the player is eating a stack and `replace_with_item` doesn't fit onto
+ the eaten stack, then the remainings go to a different spot, or are dropped.
Defaults for the `on_punch` and `on_dig` node definition callbacks
------------------------------------------------------------------