1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 18:20:36 +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:
sys4-fr 2018-01-13 15:59:22 +01:00
parent 8c48f37eb5
commit 140daf7008
3 changed files with 36 additions and 12 deletions

19
mods/nalc/bonemeal.lua Normal file
View 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

View File

@ -20,9 +20,9 @@ local mods =
"witchcraft", "cotton", "technic",
"beds", "boats", "bucket",
"nyancat", "moreores", "moreblocks",
"maptools", "doors", "flowers",
"carts", "nether", "mobs_animal",
"minercantile"
"bonemeal", "maptools", "doors",
"flowers", "carts", "nether",
"mobs_animal", "minercantile"
}
for _,mod in ipairs(mods) do

View File

@ -62,16 +62,21 @@ minetest.override_item(
}
})
minetest.override_item(
"default:dirt",
{
drop = {
items = {
{items = {"default:dirt"}},
{items = {"maptools:copper_coin"}, rarity = 32}
local drop = minetest.registered_items["default:dirt"].drop
if drop then
table.insert(drop.items, 1, {items = {"maptools:copper_coin", "default:dirt"}, rarity = 32})
else
minetest.override_item(
"default:dirt",
{
drop = {
items = {
{items = {"default:dirt"}},
{items = {"maptools:copper_coin"}, rarity = 32}
}
}
}
})
})
end
minetest.override_item(
"default:stone_with_coal",