Fix switching items in the creative inventory (fixes #3941)

This commit is contained in:
Mikita Wiśniewski 2024-04-14 13:11:41 +07:00
parent 0f20e18e53
commit 46ed6a6dda
1 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,8 @@ local function init(player)
local playername = player:get_player_name()
minetest.create_detached_inventory("creative_" .. playername, {
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
if minetest.is_creative_enabled(playername) then
if minetest.is_creative_enabled(playername) and
from_list ~= to_list then
return count
else
return 0