fix hand node not respected the range

This commit is contained in:
Alexander Weber 2022-03-23 08:48:01 +01:00 committed by bell07
parent c9fa5d92df
commit 03d424fea7
1 changed files with 14 additions and 14 deletions

View File

@ -58,20 +58,20 @@ end
local ALPHA_CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or true local ALPHA_CLIP = minetest.features.use_texture_alpha_string_modes and "clip" or true
function skin_class:set_hand_from_texture() function skin_class:set_hand_from_texture()
local hand = core.get_current_modname()..':'..self._texture:gsub('[%p%c%s]', '') local hand = core.get_current_modname()..':'..self._texture:gsub('[%p%c%s]', '')
local hand_def = {}
minetest.register_node(hand, { for k,v in pairs(minetest.registered_items[""]) do
tiles = {self:get_texture()}, if k ~= "mod_origin" and k ~= "type" and k ~= "wield_image" then
inventory_image = "wieldhand.png", hand_def[k] = v
visual_scale = 1, end
wield_scale = {x=1,y=1,z=1}, end
paramtype = "light", hand_def.tiles = {self:get_texture()}
drawtype = "mesh", hand_def.visual_scale = 1
mesh = "skinsdb_hand.b3d", hand_def.wield_scale = {x=1,y=1,z=1}
use_texture_alpha = ALPHA_CLIP, hand_def.paramtype = "light"
node_placement_prediction = "", hand_def.drawtype = "mesh"
groups = { not_in_creative_inventory = 1 } hand_def.mesh = "skinsdb_hand.b3d"
}) hand_def.use_texture_alpha = ALPHA_CLIP
minetest.register_node(hand, hand_def)
self:set_hand(hand) self:set_hand(hand)
end end