forked from stujones11/minetest-3d_armor
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Wielded items in third person does not update after the texture has been updated via metadata.
You can test youself using the command Im providing below:
Notice: This command assumes you are testing on minetest_game
core.register_chatcommand("change_sprite", {
description = "change texture of existing item to diamond sword",
func = function(name, param)
local player = core.get_player_by_name(name)
local stack = ItemStack(player:get_wielded_item())
if not player or stack:is_empty() then
return false, "You arent real or your not holding an item"
end
local meta = stack:get_meta()
meta:set_string("inventory_image", "default_tool_diamondsword.png")
meta:set_string("wield_image", "default_tool_diamondsword.png")
player:set_wielded_item(stack)
return true, "Success! Changed texture to diamond sword"
end,
})Press the "Toggle camera" button (c by default) until you are in 3rd person. You will notice that you arent holding a diamond sword (even though the textures have been changed)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working