2016-04-15 15:57:57 +02:00
|
|
|
|
2023-08-13 11:07:09 +02:00
|
|
|
local S = mobs.translate
|
|
|
|
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
2023-07-26 14:43:06 +02:00
|
|
|
local mc2 = minetest.get_modpath("mcl_core")
|
|
|
|
|
|
|
|
-- recipe items
|
|
|
|
local items = {
|
|
|
|
paper = mc2 and "mcl_core:paper" or "default:paper",
|
|
|
|
dye_black = mc2 and "mcl_dye:black" or "dye:black",
|
|
|
|
string = mc2 and "mcl_mobitems:string" or "farming:string",
|
|
|
|
stick = mc2 and "mcl_core:stick" or "default:stick",
|
|
|
|
diamond = mc2 and "mcl_core:diamond" or "default:diamond",
|
|
|
|
steel_ingot = mc2 and "mcl_core:iron_ingot" or "default:steel_ingot",
|
|
|
|
gold_block = mc2 and "mcl_core:goldblock" or "default:goldblock",
|
|
|
|
diamond_block = mc2 and "mcl_core:diamondblock" or "default:diamondblock",
|
|
|
|
stone = mc2 and "mcl_core:stone" or "default:stone",
|
|
|
|
mese_crystal = mc2 and "mcl_core:gold_ingot" or "default:mese_crystal",
|
|
|
|
wood = mc2 and "mcl_core:wood" or "default:wood",
|
|
|
|
fence_wood = mc2 and "group:fence_wood" or "default:fence_wood",
|
|
|
|
meat_raw = mc2 and "mcl_mobitems:beef" or "group:food_meat_raw",
|
|
|
|
meat_cooked = mc2 and "mcl_mobitems:cooked_beef" or "group:food_meat",
|
|
|
|
}
|
2016-06-11 10:47:43 +02:00
|
|
|
|
2024-01-30 09:02:17 +01:00
|
|
|
|
2016-04-15 16:51:04 +02:00
|
|
|
-- name tag
|
2016-04-15 15:57:57 +02:00
|
|
|
minetest.register_craftitem("mobs:nametag", {
|
2024-01-30 09:02:17 +01:00
|
|
|
description = S("Name Tag") .. " " .. S("\nRight-click Mobs Redo mob to apply"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_nametag.png",
|
2021-01-14 20:24:40 +01:00
|
|
|
groups = {flammable = 2, nametag = 1}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
2023-07-26 14:43:06 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:nametag",
|
|
|
|
recipe = {
|
|
|
|
{ items.paper, items.dye_black, items.string }
|
|
|
|
}
|
|
|
|
})
|
2016-04-15 15:57:57 +02:00
|
|
|
|
|
|
|
-- leather
|
|
|
|
minetest.register_craftitem("mobs:leather", {
|
2016-06-11 10:47:43 +02:00
|
|
|
description = S("Leather"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_leather.png",
|
2021-01-14 20:24:40 +01:00
|
|
|
groups = {flammable = 2, leather = 1}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- raw meat
|
|
|
|
minetest.register_craftitem("mobs:meat_raw", {
|
2016-06-11 10:47:43 +02:00
|
|
|
description = S("Raw Meat"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_meat_raw.png",
|
|
|
|
on_use = minetest.item_eat(3),
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {food_meat_raw = 1, flammable = 2}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
-- cooked meat
|
|
|
|
minetest.register_craftitem("mobs:meat", {
|
2016-06-11 10:47:43 +02:00
|
|
|
description = S("Meat"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_meat.png",
|
|
|
|
on_use = minetest.item_eat(8),
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {food_meat = 1, flammable = 2}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "mobs:meat",
|
|
|
|
recipe = "mobs:meat_raw",
|
2019-09-12 10:44:45 +02:00
|
|
|
cooktime = 5
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
2017-06-26 22:08:42 +02:00
|
|
|
-- lasso
|
|
|
|
minetest.register_tool("mobs:lasso", {
|
2017-06-28 10:43:51 +02:00
|
|
|
description = S("Lasso (right-click animal to put in inventory)"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_magic_lasso.png",
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {flammable = 2}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
2023-07-26 14:43:06 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:lasso",
|
|
|
|
recipe = {
|
|
|
|
{ items.string, "", items.string},
|
|
|
|
{ "", items.diamond, "" },
|
|
|
|
{ items.string, "", items.string }
|
|
|
|
}
|
|
|
|
})
|
2016-04-15 15:57:57 +02:00
|
|
|
|
2017-06-26 22:08:42 +02:00
|
|
|
minetest.register_alias("mobs:magic_lasso", "mobs:lasso")
|
|
|
|
|
2016-04-15 15:57:57 +02:00
|
|
|
-- net
|
|
|
|
minetest.register_tool("mobs:net", {
|
2016-06-11 10:47:43 +02:00
|
|
|
description = S("Net (right-click animal to put in inventory)"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_net.png",
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {flammable = 2}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
2023-07-26 14:43:06 +02:00
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:net",
|
|
|
|
recipe = {
|
|
|
|
{ items.stick, "", items.stick },
|
|
|
|
{ items.stick, "", items.stick },
|
|
|
|
{ items.string, items.stick, items.string }
|
|
|
|
}
|
|
|
|
})
|
2016-04-15 15:57:57 +02:00
|
|
|
|
|
|
|
-- shears (right click to shear animal)
|
|
|
|
minetest.register_tool("mobs:shears", {
|
2016-06-11 10:47:43 +02:00
|
|
|
description = S("Steel Shears (right-click to shear)"),
|
2016-04-15 15:57:57 +02:00
|
|
|
inventory_image = "mobs_shears.png",
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {flammable = 2}
|
2016-04-15 15:57:57 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2019-08-05 10:55:12 +02:00
|
|
|
output = "mobs:shears",
|
2016-04-15 15:57:57 +02:00
|
|
|
recipe = {
|
2023-07-26 14:43:06 +02:00
|
|
|
{ "", items.steel_ingot, "" },
|
|
|
|
{ "", items.stick, items.steel_ingot }
|
2016-04-15 15:57:57 +02:00
|
|
|
}
|
|
|
|
})
|
2016-11-08 17:11:00 +01:00
|
|
|
|
|
|
|
-- protection rune
|
|
|
|
minetest.register_craftitem("mobs:protector", {
|
|
|
|
description = S("Mob Protection Rune"),
|
|
|
|
inventory_image = "mobs_protector.png",
|
2019-09-12 10:44:45 +02:00
|
|
|
groups = {flammable = 2}
|
2016-11-08 17:11:00 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:protector",
|
|
|
|
recipe = {
|
2023-07-26 14:43:06 +02:00
|
|
|
{ items.stone, items.stone, items.stone },
|
|
|
|
{ items.stone, items.gold_block, items.stone },
|
|
|
|
{ items.stone, items.stone, items.stone }
|
2016-11-08 17:11:00 +01:00
|
|
|
}
|
|
|
|
})
|
2016-12-29 13:28:25 +01:00
|
|
|
|
2021-04-04 23:25:40 +02:00
|
|
|
-- level 2 protection rune
|
|
|
|
minetest.register_craftitem("mobs:protector2", {
|
|
|
|
description = S("Mob Protection Rune (Level 2)"),
|
|
|
|
inventory_image = "mobs_protector2.png",
|
|
|
|
groups = {flammable = 2}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:protector2",
|
|
|
|
recipe = {
|
2023-07-26 14:43:06 +02:00
|
|
|
{ "mobs:protector", items.mese_crystal, "mobs:protector" },
|
|
|
|
{ items.mese_crystal, items.diamond_block, items.mese_crystal },
|
|
|
|
{ "mobs:protector", items.mese_crystal, "mobs:protector" }
|
2021-04-04 23:25:40 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2016-12-29 13:28:25 +01:00
|
|
|
-- saddle
|
|
|
|
minetest.register_craftitem("mobs:saddle", {
|
2017-07-04 21:37:04 +02:00
|
|
|
description = S("Saddle"),
|
2018-03-12 18:07:08 +01:00
|
|
|
inventory_image = "mobs_saddle.png",
|
2021-01-14 20:24:40 +01:00
|
|
|
groups = {flammable = 2, saddle = 1}
|
2016-12-29 13:28:25 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:saddle",
|
|
|
|
recipe = {
|
|
|
|
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
2023-07-26 14:43:06 +02:00
|
|
|
{"mobs:leather", items.steel_ingot, "mobs:leather"},
|
|
|
|
{"mobs:leather", items.steel_ingot, "mobs:leather"}
|
2016-12-29 13:28:25 +01:00
|
|
|
}
|
|
|
|
})
|
2017-12-30 15:58:59 +01:00
|
|
|
|
2020-05-07 12:15:04 +02:00
|
|
|
|
|
|
|
-- make sure we can register fences
|
2022-10-07 11:29:23 +02:00
|
|
|
local mod_def = minetest.get_modpath("default")
|
|
|
|
|
|
|
|
if mod_def and default.register_fence then
|
2020-05-07 12:15:04 +02:00
|
|
|
|
2017-12-30 15:58:59 +01:00
|
|
|
-- mob fence (looks like normal fence but collision is 2 high)
|
|
|
|
default.register_fence("mobs:fence_wood", {
|
|
|
|
description = S("Mob Fence"),
|
|
|
|
texture = "default_wood.png",
|
|
|
|
material = "default:fence_wood",
|
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
2022-10-07 11:29:23 +02:00
|
|
|
sounds = mod_def and default.node_sound_wood_defaults(),
|
2017-12-30 15:58:59 +01:00
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, 1.9, 0.5},
|
2019-09-12 10:44:45 +02:00
|
|
|
}
|
|
|
|
}
|
2017-12-30 15:58:59 +01:00
|
|
|
})
|
2021-07-22 10:48:56 +02:00
|
|
|
end
|
2018-02-06 21:59:11 +01:00
|
|
|
|
2018-07-18 11:13:19 +02:00
|
|
|
-- mob fence top (has enlarged collisionbox to stop mobs getting over)
|
2019-09-12 10:44:45 +02:00
|
|
|
minetest.register_node("mobs:fence_top", {
|
|
|
|
description = S("Mob Fence Top"),
|
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {"default_wood.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
is_ground_content = false,
|
2024-01-29 17:01:59 +01:00
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, axey = 1},
|
2022-10-07 11:29:23 +02:00
|
|
|
sounds = mod_def and default.node_sound_wood_defaults(),
|
2019-09-12 10:44:45 +02:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.4, -1.5, -0.4, 0.4, 0, 0.4}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.4, -1.5, -0.4, 0.4, 0, 0.4}
|
|
|
|
}
|
2018-07-18 11:13:19 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:fence_top 12",
|
|
|
|
recipe = {
|
|
|
|
{"group:wood", "group:wood", "group:wood"},
|
2023-07-26 14:43:06 +02:00
|
|
|
{"", items.fence_wood, ""}
|
2018-07-18 11:13:19 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2020-05-07 12:15:04 +02:00
|
|
|
|
2018-02-06 21:59:11 +01:00
|
|
|
-- items that can be used as fuel
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:nametag",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 3
|
2018-02-06 21:59:11 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:lasso",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 7
|
2018-02-06 21:59:11 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:net",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 8
|
2018-02-06 21:59:11 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:leather",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 4
|
2018-02-06 21:59:11 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:saddle",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 7
|
2018-02-06 21:59:11 +01:00
|
|
|
})
|
2018-05-30 11:55:39 +02:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:fence_wood",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 7
|
2018-05-30 11:55:39 +02:00
|
|
|
})
|
2018-07-18 11:13:19 +02:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "mobs:fence_top",
|
2019-09-12 10:44:45 +02:00
|
|
|
burntime = 2
|
2018-07-18 11:13:19 +02:00
|
|
|
})
|
2019-03-23 19:36:22 +01:00
|
|
|
|
2020-05-07 12:15:04 +02:00
|
|
|
|
2019-03-23 19:36:22 +01:00
|
|
|
-- this tool spawns same mob and adds owner, protected, nametag info
|
|
|
|
-- then removes original entity, this is used for fixing any issues.
|
2022-10-07 11:29:23 +02:00
|
|
|
-- also holding sneak while punching mob lets you change texture name.
|
2019-03-23 19:36:22 +01:00
|
|
|
|
2019-03-28 19:37:46 +01:00
|
|
|
local tex_obj
|
|
|
|
|
2019-03-23 19:36:22 +01:00
|
|
|
minetest.register_tool(":mobs:mob_reset_stick", {
|
2019-05-24 15:30:42 +02:00
|
|
|
description = S("Mob Reset Stick"),
|
2019-03-23 19:36:22 +01:00
|
|
|
inventory_image = "default_stick.png^[colorize:#ff000050",
|
|
|
|
stack_max = 1,
|
|
|
|
groups = {not_in_creative_inventory = 1},
|
|
|
|
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
|
|
|
|
if pointed_thing.type ~= "object" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local obj = pointed_thing.ref
|
|
|
|
|
2019-03-28 19:37:46 +01:00
|
|
|
local control = user:get_player_control()
|
|
|
|
local sneak = control and control.sneak
|
|
|
|
|
2019-05-28 10:35:37 +02:00
|
|
|
-- spawn same mob with saved stats, with random texture
|
2019-03-28 19:37:46 +01:00
|
|
|
if obj and not sneak then
|
2019-03-23 19:36:22 +01:00
|
|
|
|
|
|
|
local self = obj:get_luaentity()
|
|
|
|
local obj2 = minetest.add_entity(obj:get_pos(), self.name)
|
|
|
|
|
|
|
|
if obj2 then
|
|
|
|
|
|
|
|
local ent2 = obj2:get_luaentity()
|
|
|
|
|
|
|
|
ent2.protected = self.protected
|
|
|
|
ent2.owner = self.owner
|
|
|
|
ent2.nametag = self.nametag
|
|
|
|
ent2.gotten = self.gotten
|
|
|
|
ent2.tamed = self.tamed
|
|
|
|
ent2.health = self.health
|
2019-03-28 19:37:46 +01:00
|
|
|
ent2.order = self.order
|
2019-03-23 19:36:22 +01:00
|
|
|
|
|
|
|
if self.child then
|
|
|
|
obj2:set_velocity({x = 0, y = self.jump_height, z = 0})
|
|
|
|
end
|
|
|
|
|
|
|
|
obj2:set_properties({nametag = self.nametag})
|
|
|
|
|
|
|
|
obj:remove()
|
|
|
|
end
|
|
|
|
end
|
2019-03-28 19:37:46 +01:00
|
|
|
|
2019-05-28 10:35:37 +02:00
|
|
|
-- display form to enter texture name ending in .png
|
2019-03-28 19:37:46 +01:00
|
|
|
if obj and sneak then
|
|
|
|
|
|
|
|
tex_obj = obj
|
|
|
|
|
2021-05-10 15:57:21 +02:00
|
|
|
-- get base texture
|
|
|
|
local bt = tex_obj:get_luaentity().base_texture[1]
|
|
|
|
|
|
|
|
if type(bt) ~= "string" then
|
|
|
|
bt = ""
|
|
|
|
end
|
|
|
|
|
2019-03-28 19:37:46 +01:00
|
|
|
local name = user:get_player_name()
|
|
|
|
|
|
|
|
minetest.show_formspec(name, "mobs_texture", "size[8,4]"
|
|
|
|
.. "field[0.5,1;7.5,0;name;"
|
2023-08-13 11:07:09 +02:00
|
|
|
.. FS("Enter texture:") .. ";" .. bt .. "]"
|
2019-03-28 19:37:46 +01:00
|
|
|
.. "button_exit[2.5,3.5;3,1;mob_texture_change;"
|
2023-08-13 11:07:09 +02:00
|
|
|
.. FS("Change") .. "]")
|
2019-03-28 19:37:46 +01:00
|
|
|
end
|
2019-09-12 10:44:45 +02:00
|
|
|
end
|
2019-03-23 19:36:22 +01:00
|
|
|
})
|
|
|
|
|
2019-03-28 19:37:46 +01:00
|
|
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|
|
|
|
|
|
|
-- right-clicked with nametag and name entered?
|
|
|
|
if formname == "mobs_texture"
|
|
|
|
and fields.name
|
|
|
|
and fields.name ~= "" then
|
|
|
|
|
2019-05-28 10:35:37 +02:00
|
|
|
-- does mob still exist?
|
|
|
|
if not tex_obj
|
|
|
|
or not tex_obj:get_luaentity() then
|
2019-03-28 19:37:46 +01:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- make sure nametag is being used to name mob
|
|
|
|
local item = player:get_wielded_item()
|
|
|
|
|
|
|
|
if item:get_name() ~= "mobs:mob_reset_stick" then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- limit name entered to 64 characters long
|
2020-05-21 21:38:08 +02:00
|
|
|
if fields.name:len() > 64 then
|
|
|
|
fields.name = fields.name:sub(1, 64)
|
2019-03-28 19:37:46 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
-- update texture
|
|
|
|
local self = tex_obj:get_luaentity()
|
|
|
|
|
|
|
|
self.base_texture = {fields.name}
|
|
|
|
|
|
|
|
tex_obj:set_properties({textures = {fields.name}})
|
|
|
|
|
|
|
|
-- reset external variable
|
|
|
|
tex_obj = nil
|
|
|
|
end
|
|
|
|
end)
|
2020-09-15 14:20:29 +02:00
|
|
|
|
|
|
|
|
2022-11-24 14:22:09 +01:00
|
|
|
-- Meat Block
|
2020-09-15 14:20:29 +02:00
|
|
|
minetest.register_node("mobs:meatblock", {
|
|
|
|
description = S("Meat Block"),
|
|
|
|
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
|
|
|
|
paramtype2 = "facedir",
|
2024-01-29 17:01:59 +01:00
|
|
|
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2, axey = 1, handy = 1},
|
2024-02-27 09:05:02 +01:00
|
|
|
is_ground_content = false,
|
2022-10-07 11:29:23 +02:00
|
|
|
sounds = mod_def and default.node_sound_leaves_defaults(),
|
2020-09-19 16:17:38 +02:00
|
|
|
on_place = minetest.rotate_node,
|
2024-01-29 17:01:59 +01:00
|
|
|
on_use = minetest.item_eat(20),
|
|
|
|
_mcl_hardness = 0.8,
|
|
|
|
_mcl_blast_resistance = 1
|
2020-09-15 14:20:29 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:meatblock",
|
|
|
|
recipe = {
|
2023-07-26 14:43:06 +02:00
|
|
|
{ items.meat_cooked, items.meat_cooked, items.meat_cooked },
|
|
|
|
{ items.meat_cooked, items.meat_cooked, items.meat_cooked },
|
|
|
|
{ items.meat_cooked, items.meat_cooked, items.meat_cooked }
|
2020-09-15 14:20:29 +02:00
|
|
|
}
|
|
|
|
})
|
2022-11-24 14:22:09 +01:00
|
|
|
|
|
|
|
-- Meat Block (raw)
|
|
|
|
minetest.register_node("mobs:meatblock_raw", {
|
|
|
|
description = S("Raw Meat Block"),
|
|
|
|
tiles = {"mobs_meat_raw_top.png", "mobs_meat_raw_bottom.png", "mobs_meat_raw_side.png"},
|
|
|
|
paramtype2 = "facedir",
|
2024-01-29 17:01:59 +01:00
|
|
|
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2, axey = 1, handy = 1},
|
2024-02-27 09:05:02 +01:00
|
|
|
is_ground_content = false,
|
2022-11-24 14:22:09 +01:00
|
|
|
sounds = mod_def and default.node_sound_leaves_defaults(),
|
|
|
|
on_place = minetest.rotate_node,
|
2024-01-29 17:01:59 +01:00
|
|
|
on_use = minetest.item_eat(20),
|
|
|
|
_mcl_hardness = 0.8,
|
|
|
|
_mcl_blast_resistance = 1
|
2022-11-24 14:22:09 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "mobs:meatblock_raw",
|
|
|
|
recipe = {
|
2023-07-26 14:43:06 +02:00
|
|
|
{ items.meat_raw, items.meat_raw, items.meat_raw },
|
|
|
|
{ items.meat_raw, items.meat_raw, items.meat_raw },
|
|
|
|
{ items.meat_raw, items.meat_raw, items.meat_raw }
|
2022-11-24 14:22:09 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "mobs:meatblock",
|
|
|
|
recipe = "mobs:meatblock_raw",
|
|
|
|
cooktime = 30
|
|
|
|
})
|