code tidy and default sounds fix
This commit is contained in:
parent
8e3a85546c
commit
b74e75ef8b
14
crafts.lua
14
crafts.lua
@ -53,6 +53,7 @@ minetest.register_tool("mobs:lasso", {
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:lasso",
|
||||
recipe = {
|
||||
@ -73,6 +74,7 @@ minetest.register_tool("mobs:net", {
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:net",
|
||||
recipe = {
|
||||
@ -148,7 +150,9 @@ minetest.register_craft({
|
||||
|
||||
|
||||
-- make sure we can register fences
|
||||
if minetest.get_modpath("default") and default.register_fence then
|
||||
local mod_def = minetest.get_modpath("default")
|
||||
|
||||
if mod_def and default.register_fence then
|
||||
|
||||
-- mob fence (looks like normal fence but collision is 2 high)
|
||||
default.register_fence("mobs:fence_wood", {
|
||||
@ -156,7 +160,7 @@ default.register_fence("mobs:fence_wood", {
|
||||
texture = "default_wood.png",
|
||||
material = "default:fence_wood",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = mod_def and default.node_sound_wood_defaults(),
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -174,7 +178,7 @@ minetest.register_node("mobs:fence_top", {
|
||||
paramtype = "light",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = mod_def and default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
|
||||
@ -244,6 +248,7 @@ minetest.register_craft({
|
||||
|
||||
-- this tool spawns same mob and adds owner, protected, nametag info
|
||||
-- then removes original entity, this is used for fixing any issues.
|
||||
-- also holding sneak while punching mob lets you change texture name.
|
||||
|
||||
local tex_obj
|
||||
|
||||
@ -359,14 +364,13 @@ minetest.register_node("mobs:meatblock", {
|
||||
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = default and default.node_sound_leaves_defaults(),
|
||||
sounds = mod_def and default.node_sound_leaves_defaults(),
|
||||
on_place = minetest.rotate_node,
|
||||
on_use = minetest.item_eat(20)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:meatblock",
|
||||
-- type = "shapeless",
|
||||
recipe = {
|
||||
{"group:food_meat", "group:food_meat", "group:food_meat"},
|
||||
{"group:food_meat", "group:food_meat", "group:food_meat"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user