0
0
Fork 0

Add all brewitems to creative inventory

This commit is contained in:
Brandon 2020-07-04 21:28:02 -04:00
parent 6cefec8cbf
commit f0e9727b85
5 changed files with 17 additions and 18 deletions

View File

@ -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."),
inventory_image = "mcl_core_sugar.png",
stack_max = 64,
groups = { craftitem = 1 },
groups = { craftitem = 1, brewitem=1 },
})
minetest.register_craftitem("mcl_core:bowl",{

View File

@ -32,7 +32,7 @@ local fish = function(itemstack, player)
local num = 0
local ent = nil
local noent = true
--Check for bobber if so handle.
for n = 1, #objs do
ent = objs[n]:get_luaentity()
@ -157,7 +157,7 @@ local bobber_on_step = function(self, dtime)
epos.y = math.floor(epos.y)
local node = minetest.get_node(epos)
local def = minetest.registered_nodes[node.name]
--If we have no player, remove self.
if self.player == nil or self.player == "" then
self.object:remove()
@ -168,7 +168,7 @@ local bobber_on_step = function(self, dtime)
self.object:remove()
return
end
--Check if player is nearby
if self._tick % 5 == 0 and self.player ~= nil and player ~= nil then
--Destroy bobber if item not wielded.
@ -177,7 +177,7 @@ local bobber_on_step = function(self, dtime)
self.object:remove()
return
end
--Destroy bobber if player is too far away.
local objpos = self.object:get_pos()
local playerpos = player:get_pos()
@ -200,7 +200,7 @@ local bobber_on_step = function(self, dtime)
self.object:remove()
return
end
end
-- If in water, then bob.
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
-- TODO: Destroy when hitting a solid node
--if self._lastpos.x~=nil then
@ -273,7 +273,7 @@ minetest.register_on_leaveplayer(function(player)
local num = 0
local ent = nil
local noent = true
for n = 1, #objs do
ent = objs[n]:get_luaentity()
if ent then
@ -292,7 +292,7 @@ minetest.register_on_dieplayer(function(player)
local num = 0
local ent = nil
local noent = true
for n = 1, #objs do
ent = objs[n]:get_luaentity()
if ent then
@ -426,7 +426,6 @@ minetest.register_craftitem("mcl_fishing:pufferfish_raw", {
on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1),
stack_max = 64,
groups = { food=2, eatable=1 },
groups = { food=2, eatable=1, brewitem = 1 },
_mcl_saturation = 0.2,
})

View File

@ -169,7 +169,7 @@ minetest.register_craftitem("mcl_mobitems:spider_eye", {
wield_image = "mcl_mobitems_spider_eye.png",
on_place = 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,
stack_max = 64,
})
@ -224,7 +224,7 @@ minetest.register_craftitem("mcl_mobitems:ghast_tear", {
wield_image = "mcl_mobitems_ghast_tear.png",
inventory_image = "mcl_mobitems_ghast_tear.png",
-- 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,
})
@ -271,7 +271,7 @@ minetest.register_craftitem("mcl_mobitems:rabbit_foot", {
wield_image = "mcl_mobitems_rabbit_foot.png",
inventory_image = "mcl_mobitems_rabbit_foot.png",
-- 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,
})
@ -317,7 +317,7 @@ minetest.register_craftitem("mcl_mobitems:gunpowder", {
_doc_items_longdesc = doc.sub.items.temp.craftitem,
inventory_image = "default_gunpowder.png",
stack_max = 64,
groups = { craftitem=1 },
groups = { craftitem=1, brewitem = 1 },
})
minetest.register_tool("mcl_mobitems:carrot_on_a_stick", {

View File

@ -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."),
inventory_image = "mcl_nether_glowstone_dust.png",
stack_max = 64,
groups = { craftitem=1 },
groups = { craftitem=1, brewitem=1 },
})
minetest.register_craftitem("mcl_nether:quartz", {

View File

@ -85,7 +85,7 @@ minetest.register_node("mcl_nether:nether_wart", {
tiles = {"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",
selection_box = {
selection_box = {
type = "fixed",
fixed = {
{-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,
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"}