mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-26 02:30: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",
|
||||
"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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user