Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
78fcd17c55 |
@ -64,25 +64,46 @@ end
|
|||||||
--MAKE YEAST NATURALLY OCCURING
|
--MAKE YEAST NATURALLY OCCURING
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
for i = 1, 5 do
|
local function append_drops(itemstring, items)
|
||||||
minetest.override_item("default:grass_"..i, {drop = {
|
local def = minetest.registered_items[itemstring]
|
||||||
max_items = 1,
|
local newdrop
|
||||||
items = {
|
if type(def.drop) == "table" then
|
||||||
{items = {'farming:seed_wheat'},rarity = 5},
|
newdrop = {max_items = def.drop.max_items, items = {}}
|
||||||
{items = {'bbq:yeast'},rarity = 8},
|
local olditems = def.drop.items
|
||||||
{items = {'default:grass_1'}},
|
local savedpos = nil
|
||||||
}
|
for i, it in ipairs(olditems) do
|
||||||
}})
|
if it.rarity == nil then
|
||||||
|
savedpos = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
table.insert(newdrop.items, it)
|
||||||
|
end
|
||||||
|
for _, it in ipairs(items) do
|
||||||
|
table.insert(newdrop.items, it)
|
||||||
|
end
|
||||||
|
if savedpos ~= nil then
|
||||||
|
for i = savedpos, #olditems do
|
||||||
|
table.insert(newdrop.items, olditems[i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
newdrop = {max_items = 1, items = table.copy(items)}
|
||||||
|
if type(def.drop) == "string" then
|
||||||
|
table.insert(newdrop.items, {items = {def.drop}})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
minetest.override_item(itemstring, {drop = newdrop})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.override_item("default:junglegrass", {drop = {
|
for i = 1, 5 do
|
||||||
max_items = 1,
|
append_drops("default:grass_"..i, {
|
||||||
items = {
|
{items = {"bbq:yeast"}, rarity = 8},
|
||||||
{items = {'farming:seed_cotton'},rarity = 8},
|
})
|
||||||
{items = {'bbq:yeast'},rarity = 8},
|
end
|
||||||
{items = {'default:junglegrass'}},
|
|
||||||
}
|
append_drops("default:junglegrass", {
|
||||||
}})
|
{items = {"bbq:yeast"}, rarity = 8},
|
||||||
|
})
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
--MAKE VESSEL TYPE ITEMS WORK WITH VESSEL SHELF
|
--MAKE VESSEL TYPE ITEMS WORK WITH VESSEL SHELF
|
||||||
|
Loading…
Reference in New Issue
Block a user