From d0207a6f69234586752f91adcdadcf1583621845 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 6 Feb 2017 14:51:52 +0100 Subject: [PATCH] Add new group: not_in_craft_guide --- API.md | 7 ++++++- mods/mcl_craftguide/init.lua | 3 ++- mods/mcstair/init.lua | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index aabdf5015..b5f57a35f 100644 --- a/API.md +++ b/API.md @@ -5,6 +5,11 @@ This document is a WORK IN PROGRESS. Currently, it only contains some informatio ## Groups This section explains all the used groups in this subgame. +### Special groups + +* `not_in_creative_inventory=1`: Item will not be shown in creative inventory +* `not_in_craft_guide=1`: Item will not be shown as result or fuel item in crafting guide (but still may be shown as ingredient) + ### Groups for interactions * `dig_by_water=1`: Blocks with this group will drop when they are near flowing water @@ -17,7 +22,7 @@ This section explains all the used groups in this subgame. * `soil_sugarcane=1`: Sugar canes will grow on this near water * `disable_suffocation=1`: Disables suffocation for full solid cubes (1) -### Footnotes +#### Footnotes 1. Normally, all walkable blocks with the default 1×1×1 cube as a collision box (e.g. sand, gravel, stone, but not fences) will damage the players while their head is inside. This diff --git a/mods/mcl_craftguide/init.lua b/mods/mcl_craftguide/init.lua index 01e120cec..fb3a4a475 100644 --- a/mods/mcl_craftguide/init.lua +++ b/mods/mcl_craftguide/init.lua @@ -300,7 +300,8 @@ function craftguide:get_init_items() local items_list, counter = {}, 0 for name, def in pairs(reg_items) do local is_fuel = get_fueltime(name) > 0 - if (get_recipe(name).items or is_fuel) + if (not def.groups.not_in_craft_guide or def.groups.not_in_raft_guide == 0) + and (get_recipe(name).items or is_fuel) and def.description and def.description ~= "" then counter = counter + 1 items_list[counter] = name diff --git a/mods/mcstair/init.lua b/mods/mcstair/init.lua index 38ad35ff8..73433ed49 100644 --- a/mods/mcstair/init.lua +++ b/mods/mcstair/init.lua @@ -194,7 +194,9 @@ function mcstair.add(name, stairtiles) outer_groups.not_in_creative_inventory = 1 local inner_groups = table.copy(outer_groups) outer_groups.stair = 2 + outer_groups.not_in_craft_guide = 1 inner_groups.stair = 3 + inner_groups.not_in_craft_guide = 1 local drop = node_def.drop or name local after_dig_node = function(pos, oldnode) local param = get_stair_param(oldnode)