2017-01-31 11:05:32 +02:00
-- Heads system
2015-06-29 20:55:56 +03:00
2017-03-11 19:56:01 +02:00
local function addhead ( node , desc , longdesc )
2017-01-31 11:05:32 +02:00
minetest.register_node ( " mcl_heads: " .. node , {
description = desc ,
2017-03-11 19:56:01 +02:00
_doc_items_longdesc = longdesc ,
2017-01-10 06:35:44 +02:00
drawtype = " nodebox " ,
is_ground_content = false ,
node_box = {
type = " fixed " ,
fixed = {
{ - 0.25 , - 0.5 , - 0.25 , 0.25 , 0.0 , 0.25 , } ,
2015-06-29 20:55:56 +03:00
} ,
2017-01-10 06:35:44 +02:00
} ,
2017-06-11 16:55:01 +03:00
groups = { handy = 1 , armor_head = 1 , head = 1 , deco_block = 1 , dig_by_piston = 1 } ,
2017-01-10 06:35:44 +02:00
tiles = {
" head_ " .. node .. " _top.png " ,
" head_ " .. node .. " _top.png " ,
" head_ " .. node .. " _left.png " ,
" head_ " .. node .. " _right.png " ,
" head_ " .. node .. " _back.png " ,
" head_ " .. node .. " _face.png " ,
} ,
paramtype = " light " ,
2017-02-02 00:18:09 +02:00
stack_max = 64 ,
2017-01-10 06:35:44 +02:00
paramtype2 = " facedir " ,
sunlight_propagates = true ,
walkable = true ,
selection_box = {
type = " fixed " ,
fixed = { - 0.25 , - 0.5 , - 0.25 , 0.25 , 0.0 , 0.25 , } ,
} ,
2017-02-11 19:46:23 +02:00
sounds = mcl_sounds.node_sound_defaults ( {
2017-01-10 06:35:44 +02:00
footstep = { name = " default_hard_footstep " , gain = 0.3 }
} ) ,
2017-02-22 17:03:59 +02:00
_mcl_blast_resistance = 5 ,
2017-02-27 02:33:34 +02:00
_mcl_hardness = 1 ,
2015-06-29 20:55:56 +03:00
} )
end
2017-01-31 11:05:32 +02:00
-- Add heads
2017-03-18 19:01:28 +02:00
addhead ( " zombie " , " Zombie Head " , " A zombie head is a small decorative block which resembles the head of a zombie. " )
addhead ( " creeper " , " Creeper Head " , " A creeper head is a small decorative block which resembles the head of a creeper. " )
2017-03-11 19:51:39 +02:00
-- Original Minecraft name: “Head”
2017-03-11 19:56:01 +02:00
addhead ( " steve " , " Human Head " , " A human head is a small decorative block which resembles the head of a human (i.e. a player character). " )
addhead ( " skeleton " , " Skeleton Skull " , " A skeleton skull is a small decorative block which resembles the head of a skeleton. " )
addhead ( " wither_skeleton " , " Wither Skeleton Skull " , " A wither skeleton skull is a small decorative block which resembles the head of a wither skeleton. " )