From b0a20fbcf39f3b0ced5bf7bb7a5dc4eec81ab96b Mon Sep 17 00:00:00 2001 From: stujones11 Date: Sat, 21 Nov 2015 16:46:30 +0000 Subject: [PATCH] Remove redundant 3d model and tweak attachment positions --- init.lua | 17 +---------------- location.lua | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 41 deletions(-) diff --git a/init.lua b/init.lua index a5a3646..353cf9b 100644 --- a/init.lua +++ b/init.lua @@ -13,7 +13,7 @@ dofile(modpath.."/location.lua") local location = { "Arm_Right", -- default bone - {x=0.2, y=5.5, z=3}, -- default position + {x=0.2, y=6.5, z=3}, -- default position {x=-100, y=225, z=90}, -- default rotation } local player_wielding = {} @@ -81,7 +81,6 @@ minetest.register_entity("wield3d:wield_entity", { if loc[1] ~= self.location[1] or vector.equals(loc[2], self.location[2]) == false or vector.equals(loc[3], self.location[3]) == false then - self.object:setpos(p2) self.object:set_detach() self.object:set_attach(player, loc[1], loc[2], loc[3]) self.location = {loc[1], loc[2], loc[3]} @@ -121,21 +120,7 @@ minetest.register_on_leaveplayer(function(player) end) minetest.register_on_joinplayer(function(player) - default.player_set_model(player, "wield3d_character.b3d") player_wielding[player:get_player_name()] = 0 minetest.after(WIELD3D_INIT_DELAY, add_wield_entity, player) end) -default.player_register_model("wield3d_character.b3d", { - animation_speed = 30, - textures = {"character.png"}, - animations = { - stand = {x=0, y=79}, - lay = {x=162, y=166}, - walk = {x=168, y=187}, - mine = {x=189, y=198}, - walk_mine = {x=200, y=219}, - sit = {x=81, y=160}, - }, -}) - diff --git a/location.lua b/location.lua index a5cf0e3..3b2906c 100644 --- a/location.lua +++ b/location.lua @@ -3,30 +3,30 @@ local bone = "Arm_Right" wield3d_location = { - ["default:torch"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["default:sapling"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:dandelion_white"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:dandelion_yellow"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:geranium"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:rose"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:tulip"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["flowers:viola"] = {bone, {x=0.2, y=5.5, z=3}, {x=-100, y=182, z=83}}, - ["default:shovel_wood"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["default:shovel_stone"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["default:shovel_steel"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["default:shovel_bronze"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["default:shovel_mese"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["default:shovel_diamond"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["bucket:bucket_empty"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["bucket:bucket_water"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["bucket:bucket_lava"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["screwdriver:screwdriver"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["screwdriver:screwdriver1"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["screwdriver:screwdriver2"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["screwdriver:screwdriver3"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["screwdriver:screwdriver4"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["vessels:glass_bottle"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["vessels:drinking_glass"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, - ["vessels:steel_bottle"] = {bone, {x=0, y=5.5, z=3}, {x=-90, y=137, z=83}}, + ["default:torch"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["default:sapling"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:dandelion_white"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:dandelion_yellow"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:geranium"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:rose"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:tulip"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["flowers:viola"] = {bone, {x=0.2, y=6.5, z=3}, {x=-100, y=182, z=83}}, + ["default:shovel_wood"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["default:shovel_stone"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["default:shovel_steel"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["default:shovel_bronze"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["default:shovel_mese"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["default:shovel_diamond"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["bucket:bucket_empty"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["bucket:bucket_water"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["bucket:bucket_lava"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["screwdriver:screwdriver"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["screwdriver:screwdriver1"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["screwdriver:screwdriver2"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["screwdriver:screwdriver3"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["screwdriver:screwdriver4"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["vessels:glass_bottle"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["vessels:drinking_glass"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, + ["vessels:steel_bottle"] = {bone, {x=0, y=6.5, z=3}, {x=-90, y=137, z=83}}, }