1
0
Fork 0

Remove heads and pumpkin from combat creative tab

objects
Wuzzy 2017-06-11 22:20:25 +02:00
parent b04abdaf99
commit 62f755f52a
4 changed files with 7 additions and 6 deletions

View File

@ -127,6 +127,7 @@ These groups are used mostly for informational purposes
* `cocoa`: Node is a cocoa pod (rating is growth stage, ranging from 1 to 3)
* `ammo=1`: Item is used as ammo for a weapon
* `ammo_bow=1`: Item is used as ammo for bows
* `non_combat_armor=1`: Item can be equipped as armor, but is not made for combat (e.g. zombie head, pumpkin)
* `container`: Node is a container which physically stores items within and has at least 1 inventory
* `container=2`: Has one inventory with list name `"main"`. Items can be placed and taken freely
* `container=3`: Same as `container=2`, but shulker boxes can not be inserted

View File

@ -22,8 +22,8 @@ do
local is_tool = function(def)
return def.groups.tool or (def.tool_capabilities ~= nil and def.tool_capabilities.damage_groups == nil)
end
local is_weapon = function(def)
return def.groups.weapon or def.groups.weapon_ranged or def.groups.ammo or def.groups.armor_head or def.groups.armor_torso or def.groups.armor_legs or def.groups.armor_feet
local is_weapon_or_armor = function(def)
return def.groups.weapon or def.groups.weapon_ranged or def.groups.ammo or ((def.groups.armor_head or def.groups.armor_torso or def.groups.armor_legs or def.groups.armor_feet) and def.groups.non_combat_armor ~= 1)
end
if def.groups.building_block then
table.insert(inventory_lists["blocks"], name)
@ -43,7 +43,7 @@ do
if is_tool(def) then
table.insert(inventory_lists["tools"], name)
end
if is_weapon(def) then
if is_weapon_or_armor(def) then
table.insert(inventory_lists["combat"], name)
end
if def.groups.brewitem then
@ -52,7 +52,7 @@ do
if def.groups.craftitem then
table.insert(inventory_lists["matr"], name)
end
if not def.groups.building_block and not def.groups.deco_block and not is_redstone(def) and not def.groups.transport and not def.groups.food and not def.groups.eatable and not is_tool(def) and not is_weapon(def) and not def.groups.craftitem and not def.groups.brewitem then
if not def.groups.building_block and not def.groups.deco_block and not is_redstone(def) and not def.groups.transport and not def.groups.food and not def.groups.eatable and not is_tool(def) and not is_weapon_or_armor(def) and not def.groups.craftitem and not def.groups.brewitem then
table.insert(inventory_lists["misc"], name)
end

View File

@ -79,7 +79,7 @@ local pumpkin_base_def = {
stack_max = 64,
paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"},
groups = {handy=1,axey=1, plant=1,building_block=1, armor_head=1, dig_by_piston=1},
groups = {handy=1,axey=1, plant=1,building_block=1, armor_head=1,non_combat_armor=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 5,
_mcl_hardness = 1,

View File

@ -12,7 +12,7 @@ local function addhead(node, desc, longdesc)
{ -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, },
},
},
groups = {handy=1, armor_head=1, head=1, deco_block=1, dig_by_piston=1},
groups = {handy=1, armor_head=1,non_combat_armor=1, head=1, deco_block=1, dig_by_piston=1},
tiles = {
"head_"..node.."_top.png",
"head_"..node.."_top.png",