forked from Mineclonia/Mineclonia
Add all brewitems to creative inventory
This commit is contained in:
parent
6cefec8cbf
commit
f0e9727b85
|
@ -121,7 +121,7 @@ minetest.register_craftitem("mcl_core:sugar", {
|
||||||
_doc_items_longdesc = S("Sugar comes from sugar canes and is used to make sweet foods."),
|
_doc_items_longdesc = S("Sugar comes from sugar canes and is used to make sweet foods."),
|
||||||
inventory_image = "mcl_core_sugar.png",
|
inventory_image = "mcl_core_sugar.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { craftitem = 1 },
|
groups = { craftitem = 1, brewitem=1 },
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("mcl_core:bowl",{
|
minetest.register_craftitem("mcl_core:bowl",{
|
||||||
|
|
|
@ -32,7 +32,7 @@ local fish = function(itemstack, player)
|
||||||
local num = 0
|
local num = 0
|
||||||
local ent = nil
|
local ent = nil
|
||||||
local noent = true
|
local noent = true
|
||||||
|
|
||||||
--Check for bobber if so handle.
|
--Check for bobber if so handle.
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
ent = objs[n]:get_luaentity()
|
ent = objs[n]:get_luaentity()
|
||||||
|
@ -157,7 +157,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
epos.y = math.floor(epos.y)
|
epos.y = math.floor(epos.y)
|
||||||
local node = minetest.get_node(epos)
|
local node = minetest.get_node(epos)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
--If we have no player, remove self.
|
--If we have no player, remove self.
|
||||||
if self.player == nil or self.player == "" then
|
if self.player == nil or self.player == "" then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
@ -168,7 +168,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--Check if player is nearby
|
--Check if player is nearby
|
||||||
if self._tick % 5 == 0 and self.player ~= nil and player ~= nil then
|
if self._tick % 5 == 0 and self.player ~= nil and player ~= nil then
|
||||||
--Destroy bobber if item not wielded.
|
--Destroy bobber if item not wielded.
|
||||||
|
@ -177,7 +177,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--Destroy bobber if player is too far away.
|
--Destroy bobber if player is too far away.
|
||||||
local objpos = self.object:get_pos()
|
local objpos = self.object:get_pos()
|
||||||
local playerpos = player:get_pos()
|
local playerpos = player:get_pos()
|
||||||
|
@ -200,7 +200,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
-- If in water, then bob.
|
-- If in water, then bob.
|
||||||
if def.liquidtype == "source" and minetest.get_item_group(def.name, "water") ~= 0 then
|
if def.liquidtype == "source" and minetest.get_item_group(def.name, "water") ~= 0 then
|
||||||
|
@ -251,7 +251,7 @@ local bobber_on_step = function(self, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: Destroy when hitting a solid node
|
-- TODO: Destroy when hitting a solid node
|
||||||
--if self._lastpos.x~=nil then
|
--if self._lastpos.x~=nil then
|
||||||
|
@ -273,7 +273,7 @@ minetest.register_on_leaveplayer(function(player)
|
||||||
local num = 0
|
local num = 0
|
||||||
local ent = nil
|
local ent = nil
|
||||||
local noent = true
|
local noent = true
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
ent = objs[n]:get_luaentity()
|
ent = objs[n]:get_luaentity()
|
||||||
if ent then
|
if ent then
|
||||||
|
@ -292,7 +292,7 @@ minetest.register_on_dieplayer(function(player)
|
||||||
local num = 0
|
local num = 0
|
||||||
local ent = nil
|
local ent = nil
|
||||||
local noent = true
|
local noent = true
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
ent = objs[n]:get_luaentity()
|
ent = objs[n]:get_luaentity()
|
||||||
if ent then
|
if ent then
|
||||||
|
@ -426,7 +426,6 @@ minetest.register_craftitem("mcl_fishing:pufferfish_raw", {
|
||||||
on_place = minetest.item_eat(1),
|
on_place = minetest.item_eat(1),
|
||||||
on_secondary_use = minetest.item_eat(1),
|
on_secondary_use = minetest.item_eat(1),
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { food=2, eatable=1 },
|
groups = { food=2, eatable=1, brewitem = 1 },
|
||||||
_mcl_saturation = 0.2,
|
_mcl_saturation = 0.2,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ minetest.register_craftitem("mcl_mobitems:spider_eye", {
|
||||||
wield_image = "mcl_mobitems_spider_eye.png",
|
wield_image = "mcl_mobitems_spider_eye.png",
|
||||||
on_place = minetest.item_eat(2),
|
on_place = minetest.item_eat(2),
|
||||||
on_secondary_use = minetest.item_eat(2),
|
on_secondary_use = minetest.item_eat(2),
|
||||||
groups = { food = 2, eatable = 2 },
|
groups = { food = 2, eatable = 2, brewitem = 1 },
|
||||||
_mcl_saturation = 3.2,
|
_mcl_saturation = 3.2,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
})
|
})
|
||||||
|
@ -224,7 +224,7 @@ minetest.register_craftitem("mcl_mobitems:ghast_tear", {
|
||||||
wield_image = "mcl_mobitems_ghast_tear.png",
|
wield_image = "mcl_mobitems_ghast_tear.png",
|
||||||
inventory_image = "mcl_mobitems_ghast_tear.png",
|
inventory_image = "mcl_mobitems_ghast_tear.png",
|
||||||
-- TODO: Reveal item when it's useful
|
-- TODO: Reveal item when it's useful
|
||||||
groups = { brewitem = 1, not_in_creative_inventory = 1 },
|
groups = { brewitem = 1, not_in_creative_inventory = 0 },
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ minetest.register_craftitem("mcl_mobitems:rabbit_foot", {
|
||||||
wield_image = "mcl_mobitems_rabbit_foot.png",
|
wield_image = "mcl_mobitems_rabbit_foot.png",
|
||||||
inventory_image = "mcl_mobitems_rabbit_foot.png",
|
inventory_image = "mcl_mobitems_rabbit_foot.png",
|
||||||
-- TODO: Reveal item when it's useful
|
-- TODO: Reveal item when it's useful
|
||||||
groups = { brewitem = 1, not_in_creative_inventory = 1 },
|
groups = { brewitem = 1, not_in_creative_inventory = 0 },
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ minetest.register_craftitem("mcl_mobitems:gunpowder", {
|
||||||
_doc_items_longdesc = doc.sub.items.temp.craftitem,
|
_doc_items_longdesc = doc.sub.items.temp.craftitem,
|
||||||
inventory_image = "default_gunpowder.png",
|
inventory_image = "default_gunpowder.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { craftitem=1 },
|
groups = { craftitem=1, brewitem = 1 },
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("mcl_mobitems:carrot_on_a_stick", {
|
minetest.register_tool("mcl_mobitems:carrot_on_a_stick", {
|
||||||
|
|
|
@ -229,7 +229,7 @@ minetest.register_craftitem("mcl_nether:glowstone_dust", {
|
||||||
_doc_items_longdesc = S("Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting."),
|
_doc_items_longdesc = S("Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting."),
|
||||||
inventory_image = "mcl_nether_glowstone_dust.png",
|
inventory_image = "mcl_nether_glowstone_dust.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = { craftitem=1 },
|
groups = { craftitem=1, brewitem=1 },
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("mcl_nether:quartz", {
|
minetest.register_craftitem("mcl_nether:quartz", {
|
||||||
|
|
|
@ -85,7 +85,7 @@ minetest.register_node("mcl_nether:nether_wart", {
|
||||||
tiles = {"mcl_nether_nether_wart_stage_2.png"},
|
tiles = {"mcl_nether_nether_wart_stage_2.png"},
|
||||||
wield_image = "mcl_nether_nether_wart_stage_2.png",
|
wield_image = "mcl_nether_nether_wart_stage_2.png",
|
||||||
inventory_image = "mcl_nether_nether_wart_stage_2.png",
|
inventory_image = "mcl_nether_nether_wart_stage_2.png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.45, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, 0.45, 0.5}
|
||||||
|
@ -135,7 +135,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = { craftitem = 1 },
|
groups = { craftitem = 1, brewitem=1 },
|
||||||
})
|
})
|
||||||
|
|
||||||
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}
|
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}
|
||||||
|
|
Loading…
Reference in New Issue