4 minetest
.register_craftitem("mobs:sheep", {
6 inventory_image
= "spawn_sheep.png",
7 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
10 on_place
= function(itemstack
, placer
, pointed_thing
)
11 if pointed_thing
.above
then
12 minetest
.add_entity(pointed_thing
.above
, "mobs:sheep")
13 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
14 minetest
.log("action", placer
:get_player_name() .. " placed a sheep at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
20 minetest
.register_craftitem("mobs:slime", {
21 description
= "slime",
22 inventory_image
= "spawn_slime.png",
23 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
26 on_place
= function(itemstack
, placer
, pointed_thing
)
27 if pointed_thing
.above
then
28 minetest
.add_entity(pointed_thing
.above
, "mobs:slime")
29 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
30 minetest
.log("action", placer
:get_player_name() .. " placed a slime at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
36 minetest
.register_craftitem("mobs:zombie", {
37 description
= "Zombie",
38 inventory_image
= "spawn_zombie.png",
39 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
42 on_place
= function(itemstack
, placer
, pointed_thing
)
43 if pointed_thing
.above
then
44 minetest
.add_entity(pointed_thing
.above
, "mobs:zombie")
45 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
46 minetest
.log("action", placer
:get_player_name() .. " placed a zombie at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
53 minetest
.register_craftitem("mobs:spider", {
54 description
= "Spider",
55 inventory_image
= "spawn_spider.png",
56 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
59 on_place
= function(itemstack
, placer
, pointed_thing
)
60 if pointed_thing
.above
then
61 minetest
.add_entity(pointed_thing
.above
, "mobs:spider")
62 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
63 minetest
.log("action", placer
:get_player_name() .. " placed a spider at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
70 minetest
.register_craftitem("mobs:creeper", {
71 description
= "Creeper",
72 inventory_image
= "spawn_creeper.png",
73 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
76 on_place
= function(itemstack
, placer
, pointed_thing
)
77 if pointed_thing
.above
then
78 minetest
.add_entity(pointed_thing
.above
, "mobs:creeper")
79 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
80 minetest
.log("action", placer
:get_player_name() .. " placed a creeper at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
86 minetest
.register_craftitem("mobs:herobrine", {
87 description
= "herobrine",
88 inventory_image
= "spawn_herobrine.png",
89 groups
= {not_in_creative_inventory
=1},
90 wield_scale
= {x
= 1.25, y
= 1.25, z
= 2.5},
91 on_place
= function(itemstack
, placer
, pointed_thing
)
92 if pointed_thing
.above
then
93 minetest
.add_entity(pointed_thing
.above
, "mobs:herobrine")
94 if not minetest
.setting_getbool("creative_mode") then itemstack
:take_item() end
95 minetest
.log("action", placer
:get_player_name() .. " placed a herobrine at " .. minetest
.pos_to_string(pointed_thing
.above
) .. ".")
101 ---------------------
102 -- Drop de monstre --
103 ---------------------
105 minetest
.register_craftitem("mobs:rotten_flesh", {
106 description
= "rotten flesh",
107 inventory_image
= "rotten_flesh.png",
108 on_use
= minetest
.item_eat(2),
111 minetest
.register_craftitem("mobs:meat_raw_sheep", {
112 description
= "Raw Mutton",
113 inventory_image
= "mutton_raw.png",
114 on_use
= minetest
.item_eat(2),
117 minetest
.register_craftitem("mobs:meat_cooked_sheep", {
118 description
= "Cooked Mutton",
119 inventory_image
= "mutton_cooked.png",
120 on_use
= minetest
.item_eat(4),
123 minetest
.register_craftitem("mobs:spider_eye", {
124 description
= "Spider Eye",
125 inventory_image
= "spider_eye.png",
126 on_use
= minetest
.item_eat(2),
129 minetest
.register_craft({
131 output
= "mobs:meat_cooked_sheep",
132 recipe
= "mobs:meat_raw_sheep",