From 1064b5e173e3a292aee072bc5145c9b767a7fdca Mon Sep 17 00:00:00 2001 From: xtreme8000 Date: Wed, 22 Nov 2023 21:51:22 +0100 Subject: [PATCH] Add a few more items --- source/item/items.c | 28 ++--- source/item/items_object.h | 210 +++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+), 14 deletions(-) diff --git a/source/item/items.c b/source/item/items.c index bf4f8e1..a7a5655 100644 --- a/source/item/items.c +++ b/source/item/items.c @@ -65,23 +65,23 @@ void items_init() { items[278] = &item_diamond_pickaxe; items[279] = &item_diamond_axe; items[280] = &item_stick; - // bowl - // soup + items[281] = &item_bowl; + items[282] = &item_mushroom_stew; items[283] = &item_gold_sword; items[284] = &item_gold_shovel; items[285] = &item_gold_pickaxe; items[286] = &item_gold_axe; - // string - // feather - // gunpowder + items[287] = &item_string; + items[288] = &item_feather; + items[289] = &item_gunpowder; items[290] = &item_wood_hoe; items[291] = &item_stone_hoe; items[292] = &item_iron_hoe; items[293] = &item_diamond_hoe; items[294] = &item_gold_hoe; - // seeds - // wheat - // bread + items[295] = &item_seeds; + items[296] = &item_wheat; + items[297] = &item_bread; // leather helmet // leather chestplate // leather leggings @@ -102,7 +102,7 @@ void items_init() { // gold chestplate // gold leggings // gold boots - // flint + items[318] = &item_flint; items[319] = &item_porkchop; items[320] = &item_porkchop_cooked; // painting @@ -115,13 +115,13 @@ void items_init() { // minecart // saddle // iron door - // redstone - // snowball + items[331] = &item_redstone; + items[332] = &item_snow_ball; // boat // leather // milk bucket // brick - // clay + items[337] = &item_clay_ball; items[338] = &item_sugarcane; // paper // book @@ -132,10 +132,10 @@ void items_init() { // compass // fishing rod // clock - // glowstone dust + items[348] = &item_glowstone_dust; // fish // cooked fish - // colored dye + items[351] = &item_dye; // bone // sugar // cake diff --git a/source/item/items_object.h b/source/item/items_object.h index 3d4fa74..1bbe7e4 100644 --- a/source/item/items_object.h +++ b/source/item/items_object.h @@ -678,4 +678,214 @@ static struct item item_porkchop_cooked = { }, }; +static struct item item_seeds = { + .name = "Seeds", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 9, + .texture_y = 0, + }, + }, +}; + +static struct item item_wheat = { + .name = "Wheat", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 9, + .texture_y = 1, + }, + }, +}; + +static struct item item_bread = { + .name = "Bread", + .has_damage = false, + .max_stack = 1, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 9, + .texture_y = 2, + }, + }, +}; + +static struct item item_flint = { + .name = "Flint", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 6, + .texture_y = 0, + }, + }, +}; + +static struct item item_string = { + .name = "String", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 8, + .texture_y = 0, + }, + }, +}; + +static struct item item_redstone = { + .name = "Redstone", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 8, + .texture_y = 3, + }, + }, +}; + +static struct item item_snow_ball = { + .name = "Snowball", + .has_damage = false, + .max_stack = 16, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 14, + .texture_y = 0, + }, + }, +}; + +static struct item item_clay_ball = { + .name = "Clay", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 9, + .texture_y = 3, + }, + }, +}; + +static struct item item_glowstone_dust = { + .name = "Glowstone Dust", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 9, + .texture_y = 4, + }, + }, +}; + +static struct item item_dye = { + .name = "Ink Sac", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 14, + .texture_y = 4, + }, + }, +}; + +static struct item item_bowl = { + .name = "Bowl", + .has_damage = false, + .max_stack = 1, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 7, + .texture_y = 4, + }, + }, +}; + +static struct item item_mushroom_stew = { + .name = "Mushroom Stew", + .has_damage = false, + .max_stack = 1, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 8, + .texture_y = 4, + }, + }, +}; + +static struct item item_feather = { + .name = "Feather", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 8, + .texture_y = 1, + }, + }, +}; + +static struct item item_gunpowder = { + .name = "Gunpowder", + .has_damage = false, + .max_stack = 64, + .renderItem = render_item_flat, + .armor.is_armor = false, + .tool.type = TOOL_TYPE_ANY, + .render_data = { + .item = { + .texture_x = 8, + .texture_y = 2, + }, + }, +}; + extern struct item item_sugarcane; \ No newline at end of file