From 29d221eed58664c4877e0af1cc5791946b485eb0 Mon Sep 17 00:00:00 2001 From: iliekprogrammar Date: Thu, 11 Aug 2022 17:15:39 +0800 Subject: [PATCH] [heads] remove unnecessarily duplicative textures these textures are unnecessary to texture the head nodes. we can reuse the available armor texture for both the headgear/helmet and the nodes. --- mods/ITEMS/mcl_heads/init.lua | 48 ++++++++---------- .../textures/mcl_heads_creeper_node.png | Bin 676 -> 0 bytes .../textures/mcl_heads_skeleton_node.png | Bin 432 -> 0 bytes .../textures/mcl_heads_steve_node.png | Bin 1852 -> 0 bytes .../mcl_heads_wither_skeleton_node.png | Bin 432 -> 0 bytes .../textures/mcl_heads_zombie_node.png | Bin 1112 -> 0 bytes 6 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png delete mode 100644 mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png delete mode 100644 mods/ITEMS/mcl_heads/textures/mcl_heads_steve_node.png delete mode 100644 mods/ITEMS/mcl_heads/textures/mcl_heads_wither_skeleton_node.png delete mode 100644 mods/ITEMS/mcl_heads/textures/mcl_heads_zombie_node.png diff --git a/mods/ITEMS/mcl_heads/init.lua b/mods/ITEMS/mcl_heads/init.lua index 25f1b9d2f..a971d7b91 100644 --- a/mods/ITEMS/mcl_heads/init.lua +++ b/mods/ITEMS/mcl_heads/init.lua @@ -189,10 +189,9 @@ end --- @class HeadDef --- @field name string identifier for node ---- @field texture string texture filename for node +--- @field texture string armor texture for node --- @field description string translated description --- @field longdesc string translated doc description ---- @field armor_texture string texture filename for armor --- @field range_mob string name of mob affected by range reduction --- @field range_factor number factor of range reduction @@ -210,24 +209,25 @@ function mcl_heads.register_head(head_def) tiles = { -- Note: bottom texture is overlaid over top texture to get rid of possible transparency. -- This is required for skeleton skull and wither skeleton skull. - "[combine:16x16:-4,4=" ..head_def.texture, -- top - "([combine:16x16:-4,4=" ..head_def.texture..")^([combine:16x16:-12,4="..head_def.texture..")", -- bottom - "[combine:16x16:-12,0=" ..head_def.texture, -- left - "[combine:16x16:4,0=" ..head_def.texture, -- right - "[combine:16x16:-20,0=" ..head_def.texture, -- back - "[combine:16x16:-4,0=" ..head_def.texture, -- front + -- Note: -x coords go right per-pixel, -y coords go down per-pixel + "[combine:16x16:-36,4=" ..head_def.texture, -- top + "([combine:16x16:-36,4=" ..head_def.texture..")^([combine:16x16:-44,4="..head_def.texture..")", -- bottom + "[combine:16x16:-28,0=" ..head_def.texture, -- left + "[combine:16x16:-44,0=" ..head_def.texture, -- right + "[combine:16x16:-52,0=" ..head_def.texture, -- back + "[combine:16x16:-36,0=" ..head_def.texture, -- front }, _mcl_armor_mob_range_mob = head_def.range_mob, _mcl_armor_mob_range_factor = head_def.range_factor, - _mcl_armor_texture = head_def.armor_texture + _mcl_armor_texture = head_def.texture })) -- register the angled floor head nodes for i, d in ipairs(mcl_heads.FLOOR_DEGREES) do minetest.register_node(name ..d, table.update(table.copy(mcl_heads.deftemplate_floor_angled), { mesh = "mcl_heads_floor" ..d ..".obj", - tiles = { head_def.armor_texture }, + tiles = { head_def.texture }, drop = name, })) end @@ -235,15 +235,16 @@ function mcl_heads.register_head(head_def) -- register the wall head node minetest.register_node(name .."_wall", table.update(table.copy(mcl_heads.deftemplate_wall), { -- The head textures are based off the textures of an actual mob. + -- Note: -x coords go right per-pixel, -y coords go down per-pixel tiles = { - { name = "[combine:16x16:-4,-4=" ..head_def.texture, align_style = "world" }, -- front - { name = "[combine:16x16:-20,-4="..head_def.texture, align_style = "world" }, -- back - { name = "[combine:16x16:-8,-4=" ..head_def.texture, align_style = "world" }, -- left - { name = "[combine:16x16:0,-4=" ..head_def.texture, align_style = "world" }, -- right - { name = "([combine:16x16:-4,0=" ..head_def.texture ..")^[transformR180", align_style = "node" }, -- top + { name = "[combine:16x16:-36,-4=" ..head_def.texture, align_style = "world" }, -- front + { name = "[combine:16x16:-52,-4="..head_def.texture, align_style = "world" }, -- back + { name = "[combine:16x16:-40,-4=" ..head_def.texture, align_style = "world" }, -- right + { name = "[combine:16x16:-32,-4=" ..head_def.texture, align_style = "world" }, -- left + { name = "([combine:16x16:-36,0=" ..head_def.texture ..")^[transformR180", align_style = "node" }, -- top -- Note: bottom texture is overlaid over top texture to get rid of possible transparency. -- This is required for skeleton skull and wither skeleton skull. - { name = "([combine:16x16:-4,8=" ..head_def.texture ..")^([combine:16x16:-12,8=" ..head_def.texture..")", align_style = "node" }, -- bottom + { name = "([combine:16x16:-36,0=" ..head_def.texture ..")^([combine:16x16:-44,8=" ..head_def.texture..")", align_style = "node" }, -- bottom }, drop = name, })) @@ -253,20 +254,18 @@ end mcl_heads.register_head{ name = "zombie", - texture = "mcl_heads_zombie_node.png", + texture = "mcl_heads_zombie.png", description = S("Zombie Head"), longdesc = S("A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%."), - armor_texture = "mcl_heads_zombie.png", range_mob = "mobs_mc:zombie", range_factor = 0.5, } mcl_heads.register_head{ name = "creeper", - texture = "mcl_heads_creeper_node.png", + texture = "mcl_heads_creeper.png", description = S("Creeper Head"), longdesc = S("A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%."), - armor_texture = "mcl_heads_creeper.png", range_mob = "mobs_mc:creeper", range_factor = 0.5, } @@ -274,26 +273,23 @@ mcl_heads.register_head{ -- Original Minecraft name: “Head” mcl_heads.register_head{ name = "steve", - texture = "mcl_heads_steve_node.png", + texture = "mcl_heads_steve.png", description = S("Human Head"), longdesc = S("A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection."), - armor_texture = "mcl_heads_steve.png", } mcl_heads.register_head{ name = "skeleton", - texture = "mcl_heads_skeleton_node.png", + texture = "mcl_heads_skeleton.png", description = S("Skeleton Skull"), longdesc = S("A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%."), - armor_texture = "mcl_heads_skeleton.png", range_mob = "mobs_mc:skeleton", range_factor = 0.5, } mcl_heads.register_head{ name = "wither_skeleton", - texture = "mcl_heads_wither_skeleton_node.png", + texture = "mcl_heads_wither_skeleton.png", description = S("Wither Skeleton Skull"), longdesc = S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection."), - armor_texture = "mcl_heads_wither_skeleton.png", } diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_creeper_node.png deleted file mode 100644 index 99b432ac67db7900cdbf4ad0075288fc59381168..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)-`Z<|gO2k=b4ojZ{2kvo1$J@UYc88LTiDHF~+Rm6Mu)TyY) z)R98Q*dPn_-@rrTf3D`-AS1co>B0Mm-}Vfd=lD;shQj@r z=MP=K%+%+sOqzF4(1Q0sBlbzNR~_(}zx;9zR2k=Df%Q8Wu}9MAZS;pe~+|*}NsHN*0S20Cu^Tfnz`KKSvxyq6ppYQpH`&%FbSA)AI&P#j{ zEpT7M!uLGe{&dgj#vN!-3ss8UX$mJz*JQ9Xz3A08w_{U-L#z%-ldW1XNd=Aa+;G!+ zY^6SGuusaj1;+XaQ=pkHuZ<8zP@yF?5DS#qYVr3js4GSLmU6IB={i%m6L^=M0E4(X ztqq}ZU6;plw-PE-qB;T2PT<&QnFd|{)4*V;PXs zW{(&H*w76z*mOpEpa`yi2KIRB0^3G205+WS9(WoJUQFM;vB^5TJ+`k2tb1Tmi=c8% zpV5~w3}1%65j^&Q{9j5;_^N10000< KMNUMnLSTaNDmEqn diff --git a/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png b/mods/ITEMS/mcl_heads/textures/mcl_heads_skeleton_node.png deleted file mode 100644 index 0af86cd6a5e79a56e21ea9fb18cc64e40cc99731..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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