From f0e9727b851fc328b05429e9bcc793c4e72fcd80 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 4 Jul 2020 21:28:02 -0400 Subject: [PATCH] Add all brewitems to creative inventory --- mods/ITEMS/mcl_core/craftitems.lua | 2 +- mods/ITEMS/mcl_fishing/init.lua | 19 +++++++++---------- mods/ITEMS/mcl_mobitems/init.lua | 8 ++++---- mods/ITEMS/mcl_nether/init.lua | 2 +- mods/ITEMS/mcl_nether/nether_wart.lua | 4 ++-- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/mods/ITEMS/mcl_core/craftitems.lua b/mods/ITEMS/mcl_core/craftitems.lua index 9dc9d3705..122445095 100644 --- a/mods/ITEMS/mcl_core/craftitems.lua +++ b/mods/ITEMS/mcl_core/craftitems.lua @@ -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",{ diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 53eefdad3..aee940931 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -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, }) - diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index 1f8a13ff6..e2626c662 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -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", { diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index e7612c906..22d295d5b 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -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", { diff --git a/mods/ITEMS/mcl_nether/nether_wart.lua b/mods/ITEMS/mcl_nether/nether_wart.lua index 7744a1fec..a408b96c5 100644 --- a/mods/ITEMS/mcl_nether/nether_wart.lua +++ b/mods/ITEMS/mcl_nether/nether_wart.lua @@ -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"}