1 --MC Heads for minetest
5 local MP
= minetest
.get_modpath(minetest
.get_current_modname())
6 local S
, NS
= dofile(MP
.."/intllib.lua")
11 if minetest
.get_modpath("default") then
12 sounds
= default
.node_sound_defaults({
13 footstep
= {name
="default_hard_footstep", gain
=0.3}
17 local function addhead(mobname
, desc
, longdesc
)
18 if not mobs_mc
.is_item_variable_overridden("head_"..mobname
) then
21 minetest
.register_node("mobs_mc:head_"..mobname
, {
23 _doc_items_longdesc
= longdesc
,
25 is_ground_content
= false,
29 { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, },
32 groups
= { oddly_breakable_by_hand
=3, head
=1, },
33 -- The head textures are based off the textures of an actual mob.
34 -- FIXME: This code assumes 16×16 textures for the mob textures!
36 -- Note: bottom texture is overlaid over top texture to get rid of possible transparency.
37 -- This is required for skeleton skull and wither skeleton skull.
38 "[combine:16x16:-4,4=mobs_mc_"..mobname
..".png", -- top
39 "([combine:16x16:-4,4=mobs_mc_"..mobname
..".png)^([combine:16x16:-12,4=mobs_mc_"..mobname
..".png)", -- bottom
40 "[combine:16x16:-12,0=mobs_mc_"..mobname
..".png", -- left
41 "[combine:16x16:4,0=mobs_mc_"..mobname
..".png", -- right
42 "[combine:16x16:-20,0=mobs_mc_"..mobname
..".png", -- back
43 "[combine:16x16:-4,0=mobs_mc_"..mobname
..".png", -- front
46 paramtype2
= "facedir",
47 sunlight_propagates
= true,
52 fixed
= { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, },
58 addhead("zombie", S("Zombie Head"), S("A zombie head is a small decorative block which resembles the head of a zombie."))
59 addhead("creeper", S("Creeper Head"), S("A creeper head is a small decorative block which resembles the head of a creeper."))
60 addhead("skeleton", S("Skeleton Skull"), S("A skeleton skull is a small decorative block which resembles the skull of a skeleton."))
61 addhead("wither_skeleton", S("Wither Skeleton Skull"), S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton."))