-
Notifications
You must be signed in to change notification settings - Fork 2k
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inventory not being rendered #9640
Comments
Inventory lists and inventory formspecs are sent very closely together: Lines 1005 to 1009 in aa3cf40
Does this happen using the default settings (i.e. rename "minetest.conf")?
Which lists? Please provide the each different warning log line. |
I can reproduce, sometimes. Code I've used for testinglocal detached_test_inv_exists = false
local function show_inv_formspec(name)
print("opening inv test formspec...")
local inv_name = "fs_test_detached_inv"
if not detached_test_inv_exists then
local inv = minetest.create_detached_inventory(inv_name, {
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
return count
end,
allow_put = function(inv, listname, index, stack, player)
return stack:get_count()
end,
allow_take = function(inv, listname, index, stack, player)
return stack:get_count()
end,
--~ on_move = function(inv, from_list, from_index, to_list, to_index, count, player),
on_put = function(inv, listname, index, stack, player)
minetest.remove_detached_inventory(inv_name)
detached_test_inv_exists = false
end,
--~ on_take = function(inv, listname, index, stack, player),
})
inv:set_size("baum", 6)
detached_test_inv_exists = true
end
--~ minetest.remove_detached_inventory(inv_name)
minetest.show_formspec(name, "fs_test_inv", "formspec_version[3]"..
"size["..(9 + 7 * 0.25)..",10]"..
"list[detached:"..inv_name..";baum;0.5,0.5;3,2;0]"..
"list[current_player;main;0.5,3.25;8,4;]"
)
print("finished.")
end
minetest.register_chatcommand("fs", {
params = "",
description = "Show the test formspec.",
privs = {},
func = function(name, param)
show_inv_formspec(name)
return true
end,
}) |
Wouldn't the simple solution be to send the inventory before the formspec? Or create a statement which delays the sending of one or the other |
This issue arises on the server Tunnelers' Abyss with the mod 'inventorybags' on clients newer than 5.1.1, to confirm. |
This happens when granting creative in a non-creative game |
Fix: #9700 |
Minetest version 5.2.0
Summary
Inventory not being rendered when it is created on the same server step the form using it is send.
It seems the client is not yet aware of the newly created inventory.
Steps to reproduce
Create a detached inventory and send formspec to client on same step to get:
GUIFormSpecMenu::parseList(): The inventory list ##### @ ####### doesn't exist
Seems the issue was introduced by commit 7843822
In file src/gui/guiFormSpecMenu.cpp
The text was updated successfully, but these errors were encountered: