mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-26 18:50:38 +01:00
Fix get bone when digging default:dirt with a chance 1/30
This was removed by nalc maptools customization
This commit is contained in:
parent
8c48f37eb5
commit
140daf7008
19
mods/nalc/bonemeal.lua
Normal file
19
mods/nalc/bonemeal.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
if minetest.get_modpath("bonemeal") then
|
||||||
|
-- NALC : Remove dirt with bones to avoid infinite bones creation with the same dirt block
|
||||||
|
minetest.override_item(
|
||||||
|
"default:dirt",
|
||||||
|
{
|
||||||
|
drop = {
|
||||||
|
max_items = 1,
|
||||||
|
items = {
|
||||||
|
{
|
||||||
|
items = {"bonemeal:bone"}, -- NALC : Removed default:dirt
|
||||||
|
rarity = 30,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
items = {"default:dirt"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
@ -20,9 +20,9 @@ local mods =
|
|||||||
"witchcraft", "cotton", "technic",
|
"witchcraft", "cotton", "technic",
|
||||||
"beds", "boats", "bucket",
|
"beds", "boats", "bucket",
|
||||||
"nyancat", "moreores", "moreblocks",
|
"nyancat", "moreores", "moreblocks",
|
||||||
"maptools", "doors", "flowers",
|
"bonemeal", "maptools", "doors",
|
||||||
"carts", "nether", "mobs_animal",
|
"flowers", "carts", "nether",
|
||||||
"minercantile"
|
"mobs_animal", "minercantile"
|
||||||
}
|
}
|
||||||
|
|
||||||
for _,mod in ipairs(mods) do
|
for _,mod in ipairs(mods) do
|
||||||
|
@ -62,16 +62,21 @@ minetest.override_item(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.override_item(
|
local drop = minetest.registered_items["default:dirt"].drop
|
||||||
"default:dirt",
|
if drop then
|
||||||
{
|
table.insert(drop.items, 1, {items = {"maptools:copper_coin", "default:dirt"}, rarity = 32})
|
||||||
drop = {
|
else
|
||||||
items = {
|
minetest.override_item(
|
||||||
{items = {"default:dirt"}},
|
"default:dirt",
|
||||||
{items = {"maptools:copper_coin"}, rarity = 32}
|
{
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"default:dirt"}},
|
||||||
|
{items = {"maptools:copper_coin"}, rarity = 32}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
end
|
||||||
|
|
||||||
minetest.override_item(
|
minetest.override_item(
|
||||||
"default:stone_with_coal",
|
"default:stone_with_coal",
|
||||||
|
Loading…
Reference in New Issue
Block a user