diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ecdc7f..33723f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,17 @@ - Added Stained Glass - Start working on a new entity API to replace mobs_redo +- Added many new foods + - Added Carrots + - Added Bananas + - Added Potatoes, Cooked Potatoes, and Sliced Potatoes + - Added French Fries which can be made from frying Sliced Potatoes - Added Farming Mechanics - Added Hoes - Added Wheat Crops - - Added Carrots and Carrot Crops -- Added Bananas + - Added Carrot Crops + - Added Potato Crops +- Added Frying Pans with a new cooking system - Added Stone/Darkstone/Granite/Andesite Bricks - Glass should be connected with connected glass setting now diff --git a/mods/CORE/pyutest/models/pyutest-frying-pan.obj b/mods/CORE/pyutest/models/pyutest-frying-pan.obj new file mode 100644 index 0000000..8343179 --- /dev/null +++ b/mods/CORE/pyutest/models/pyutest-frying-pan.obj @@ -0,0 +1,325 @@ +# Made in Blockbench 4.11.1 +mtllib pyutest-frying-pan.mtl + +o cube +v 0.5 -0.4375 0.5 +v 0.5 -0.4375 -0.5 +v 0.5 -0.5 0.5 +v 0.5 -0.5 -0.5 +v -0.5 -0.4375 -0.5 +v -0.5 -0.4375 0.5 +v -0.5 -0.5 -0.5 +v -0.5 -0.5 0.5 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0 +vt 0 0 +vt 0 1 +vt 1 1 +vt 1 0 +vt 0 0 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 +o cube +v 0.5 -0.3125 -0.4375 +v 0.5 -0.3125 -0.5 +v 0.5 -0.4375 -0.4375 +v 0.5 -0.4375 -0.5 +v -0.5 -0.3125 -0.5 +v -0.5 -0.3125 -0.4375 +v -0.5 -0.4375 -0.5 +v -0.5 -0.4375 -0.4375 +vt 0 1 +vt 1 1 +vt 1 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 1 1 +vt 1 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 12/28/7 15/27/7 13/26/7 10/25/7 +f 11/32/8 12/31/8 10/30/8 9/29/8 +f 16/36/9 11/35/9 9/34/9 14/33/9 +f 15/40/10 16/39/10 14/38/10 13/37/10 +f 14/44/11 9/43/11 10/42/11 13/41/11 +f 15/48/12 12/47/12 11/46/12 16/45/12 +o cube +v 0.5 -0.3125 0.5 +v 0.5 -0.3125 0.4375 +v 0.5 -0.4375 0.5 +v 0.5 -0.4375 0.4375 +v -0.5 -0.3125 0.4375 +v -0.5 -0.3125 0.5 +v -0.5 -0.4375 0.4375 +v -0.5 -0.4375 0.5 +vt 0 1 +vt 1 1 +vt 1 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 1 1 +vt 1 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vt 0 1 +vt 1 1 +vt 1 0.9375 +vt 0 0.9375 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 20/52/13 23/51/13 21/50/13 18/49/13 +f 19/56/14 20/55/14 18/54/14 17/53/14 +f 24/60/15 19/59/15 17/58/15 22/57/15 +f 23/64/16 24/63/16 22/62/16 21/61/16 +f 22/68/17 17/67/17 18/66/17 21/65/17 +f 23/72/18 20/71/18 19/70/18 24/69/18 +o cube +v 0.4375000000000001 -0.3125 0.4375 +v 0.5 -0.3125 0.4375 +v 0.4375000000000001 -0.4375 0.4375 +v 0.5 -0.4375 0.4375 +v 0.4999999999999999 -0.3125 -0.4375 +v 0.4374999999999999 -0.3125 -0.4375 +v 0.4999999999999999 -0.4375 -0.4375 +v 0.4374999999999999 -0.4375 -0.4375 +vt 0 1 +vt 0.875 1 +vt 0.875 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.875 1 +vt 0.875 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.875 1 +vt 0.875 0.9375 +vt 0 0.9375 +vt 0 1 +vt 0.875 1 +vt 0.875 0.9375 +vt 0 0.9375 +vn 1 0 -2.220446049250313e-16 +vn 2.220446049250313e-16 0 1 +vn -1 0 2.220446049250313e-16 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 28/76/19 31/75/19 29/74/19 26/73/19 +f 27/80/20 28/79/20 26/78/20 25/77/20 +f 32/84/21 27/83/21 25/82/21 30/81/21 +f 31/88/22 32/87/22 30/86/22 29/85/22 +f 30/92/23 25/91/23 26/90/23 29/89/23 +f 31/96/24 28/95/24 27/94/24 32/93/24 +o cube +v -0.4999999999999999 -0.3125 0.4375 +v -0.4374999999999999 -0.3125 0.4375 +v -0.4999999999999999 -0.4375 0.4375 +v -0.4374999999999999 -0.4375 0.4375 +v -0.4375000000000001 -0.3125 -0.4375 +v -0.5000000000000001 -0.3125 -0.4375 +v -0.4375000000000001 -0.4375 -0.4375 +v -0.5000000000000001 -0.4375 -0.4375 +vt 0 1 +vt 0.875 1 +vt 0.875 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.875 1 +vt 0.875 0.875 +vt 0 0.875 +vt 0 1 +vt 0.0625 1 +vt 0.0625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.875 1 +vt 0.875 0.9375 +vt 0 0.9375 +vt 0 1 +vt 0.875 1 +vt 0.875 0.9375 +vt 0 0.9375 +vn 1 0 -2.220446049250313e-16 +vn 2.220446049250313e-16 0 1 +vn -1 0 2.220446049250313e-16 +vn -2.220446049250313e-16 0 -1 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 36/100/25 39/99/25 37/98/25 34/97/25 +f 35/104/26 36/103/26 34/102/26 33/101/26 +f 40/108/27 35/107/27 33/106/27 38/105/27 +f 39/112/28 40/111/28 38/110/28 37/109/28 +f 38/116/29 33/115/29 34/114/29 37/113/29 +f 39/120/30 36/119/30 35/118/30 40/117/30 +o cube +v 0.0625 -0.3125 1.25 +v 0.0625 -0.3125 0.625 +v 0.0625 -0.4375 1.25 +v 0.0625 -0.4375 0.625 +v -0.0625 -0.3125 0.625 +v -0.0625 -0.3125 1.25 +v -0.0625 -0.4375 0.625 +v -0.0625 -0.4375 1.25 +vt 0 1 +vt 0.125 1 +vt 0.125 0.875 +vt 0 0.875 +vt 0 1 +vt 0.625 1 +vt 0.625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.125 1 +vt 0.125 0.875 +vt 0 0.875 +vt 0 1 +vt 0.625 1 +vt 0.625 0.875 +vt 0 0.875 +vt 0 1 +vt 0.125 1 +vt 0.125 0.375 +vt 0 0.375 +vt 0 1 +vt 0.125 1 +vt 0.125 0.375 +vt 0 0.375 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 44/124/31 47/123/31 45/122/31 42/121/31 +f 43/128/32 44/127/32 42/126/32 41/125/32 +f 48/132/33 43/131/33 41/130/33 46/129/33 +f 47/136/34 48/135/34 46/134/34 45/133/34 +f 46/140/35 41/139/35 42/138/35 45/137/35 +f 47/144/36 44/143/36 43/142/36 48/141/36 +o cube +v 0.125 -0.3125 0.625 +v 0.125 -0.3125 0.5 +v 0.125 -0.4375 0.625 +v 0.125 -0.4375 0.5 +v -0.125 -0.3125 0.5 +v -0.125 -0.3125 0.625 +v -0.125 -0.4375 0.5 +v -0.125 -0.4375 0.625 +vt 0 1 +vt 0.25 1 +vt 0.25 0.875 +vt 0 0.875 +vt 0 1 +vt 0.125 1 +vt 0.125 0.875 +vt 0 0.875 +vt 0 1 +vt 0.25 1 +vt 0.25 0.875 +vt 0 0.875 +vt 0 1 +vt 0.125 1 +vt 0.125 0.875 +vt 0 0.875 +vt 0 1 +vt 0.25 1 +vt 0.25 0.875 +vt 0 0.875 +vt 0 1 +vt 0.25 1 +vt 0.25 0.875 +vt 0 0.875 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl none +f 52/148/37 55/147/37 53/146/37 50/145/37 +f 51/152/38 52/151/38 50/150/38 49/149/38 +f 56/156/39 51/155/39 49/154/39 54/153/39 +f 55/160/40 56/159/40 54/158/40 53/157/40 +f 54/164/41 49/163/41 50/162/41 53/161/41 +f 55/168/42 52/167/42 51/166/42 56/165/42 \ No newline at end of file diff --git a/mods/ITEMS/pyutest_cooking/init.lua b/mods/ITEMS/pyutest_cooking/init.lua new file mode 100644 index 0000000..d259e6c --- /dev/null +++ b/mods/ITEMS/pyutest_cooking/init.lua @@ -0,0 +1,49 @@ +-- i hate nodeboxes so much i basically just guessed random numbers until it was "good enough" +local nodebox = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } +} + +PyuTest.make_node("pyutest_cooking:frying_pan", "Frying Pan",{ + oddly_breakable_by_hand = PyuTest.BLOCK_FAST +}, {"pyutest-darkstone.png"}, { + drawtype = "mesh", + paramtype = "light", + paramtype2 = "4dir", + mesh = "pyutest-frying-pan.obj", + selection_box = nodebox, + collision_box = nodebox, + on_rightclick = function (pos, node, clicker, itemstack, pointed_thing) + if not clicker then + return + end + + if not clicker:is_player() then + return + end + + if not itemstack:is_known() then + return itemstack + end + + local def = minetest.registered_items[itemstack:get_name()] + + if def.__pyutest_cook_into then + local inv = clicker:get_inventory() + local count = itemstack:get_count() + itemstack:set_name(def.__pyutest_cook_into) + for i = 1, count do + local s = ItemStack(def.__pyutest_cook_into) + s:set_count(1) + local leftover = inv:add_item("main", s) + if leftover then + minetest.add_item(pos, leftover) + end + end + + return ItemStack() + else + return itemstack + end + end +}) diff --git a/mods/ITEMS/pyutest_cooking/mod.conf b/mods/ITEMS/pyutest_cooking/mod.conf new file mode 100644 index 0000000..d3c5936 --- /dev/null +++ b/mods/ITEMS/pyutest_cooking/mod.conf @@ -0,0 +1 @@ +depends = pyutest_blocks diff --git a/mods/ITEMS/pyutest_crafts/init.lua b/mods/ITEMS/pyutest_crafts/init.lua index a1bec85..db67ec9 100644 --- a/mods/ITEMS/pyutest_crafts/init.lua +++ b/mods/ITEMS/pyutest_crafts/init.lua @@ -283,6 +283,14 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "pyutest_tools:sliced_potato 2", + recipe = { + "pyutest_tools:potato" + }, + type = "shapeless" +}) + minetest.register_craft({ type = "cooking", output = "pyutest_blocks:glass", diff --git a/mods/ITEMS/pyutest_crafts/mod.conf b/mods/ITEMS/pyutest_crafts/mod.conf index f325660..ba255dd 100644 --- a/mods/ITEMS/pyutest_crafts/mod.conf +++ b/mods/ITEMS/pyutest_crafts/mod.conf @@ -1 +1 @@ -depends = pyutest_tools,pyutest_blocks,pyutest_farming +depends = pyutest_tools,pyutest_blocks,pyutest_farming,pyutest_cooking diff --git a/mods/ITEMS/pyutest_farming/init.lua b/mods/ITEMS/pyutest_farming/init.lua index 70bdb41..306e751 100644 --- a/mods/ITEMS/pyutest_farming/init.lua +++ b/mods/ITEMS/pyutest_farming/init.lua @@ -13,3 +13,9 @@ PyuTest.make_crop("pyutest_farming:carrot", "Carrot", "pyutest_tools:carrot 3", grown_color = "#d19d79", seed_color = "#d19d79" }) + +PyuTest.make_crop("pyutest_farming:potato", "Potato", "pyutest_tools:potato 5", 70, 0.75, { + crop_color = "#9e7b58", + grown_color = "#9e7b58", + seed_color = "#9e7b58" +}) diff --git a/mods/ITEMS/pyutest_tools/api.lua b/mods/ITEMS/pyutest_tools/api.lua index 6874577..338a395 100644 --- a/mods/ITEMS/pyutest_tools/api.lua +++ b/mods/ITEMS/pyutest_tools/api.lua @@ -49,7 +49,7 @@ PyuTest.make_sword = function (nsname, desc, texture, damage, durability, atkspe }) end -PyuTest.make_food = function (nsname, desc, wield_image, health_fill, extra_code) +PyuTest.make_food = function (nsname, desc, wield_image, health_fill, cook_into, extra_code) local code = extra_code or function()end PyuTest.make_item(nsname, desc, { @@ -60,6 +60,7 @@ PyuTest.make_food = function (nsname, desc, wield_image, health_fill, extra_code minetest.sound_play({name = "eat", gain = 1}, {pos = user:get_pos(), start_time = 1.2}) minetest.do_item_eat(health_fill, "", itemstack, user, pt) code() - end + end, + __pyutest_cook_into = cook_into }) end diff --git a/mods/ITEMS/pyutest_tools/food.lua b/mods/ITEMS/pyutest_tools/food.lua index cc9cc46..68797fe 100644 --- a/mods/ITEMS/pyutest_tools/food.lua +++ b/mods/ITEMS/pyutest_tools/food.lua @@ -3,3 +3,7 @@ PyuTest.make_food("pyutest_tools:bread", "Bread", "pyutest-bread.png", 4) PyuTest.make_food("pyutest_tools:carrot", "Carrot", "pyutest-carrot.png", 7) PyuTest.make_food("pyutest_tools:banana", "Banana", "pyutest-banana.png", 6) PyuTest.make_food("pyutest_tools:water_bottle", "Water Bottle", "pyutest-water-bottle.png", 0) + +PyuTest.make_food("pyutest_tools:potato", "Potato", "pyutest-potato.png", 3, "pyutest_tools:cooked_potato") +PyuTest.make_food("pyutest_tools:cooked_potato", "Cooked Potato", "pyutest-cooked-potato.png", 7) +PyuTest.make_food("pyutest_tools:sliced_potato", "Sliced Potato", "pyutest-sliced-potato.png", 0.5, "pyutest_tools:french_fries")PyuTest.make_food("pyutest_tools:french_fries", "French Fries", "pyutest-french-fries.png", 6.5) diff --git a/textures/pyutest-cooked-potato.png b/textures/pyutest-cooked-potato.png new file mode 100644 index 0000000..37534f4 Binary files /dev/null and b/textures/pyutest-cooked-potato.png differ diff --git a/textures/pyutest-french-fries.png b/textures/pyutest-french-fries.png new file mode 100644 index 0000000..2c4e23e Binary files /dev/null and b/textures/pyutest-french-fries.png differ diff --git a/textures/pyutest-potato.png b/textures/pyutest-potato.png new file mode 100644 index 0000000..585d2e3 Binary files /dev/null and b/textures/pyutest-potato.png differ diff --git a/textures/pyutest-sliced-potato.png b/textures/pyutest-sliced-potato.png new file mode 100644 index 0000000..b0d352e Binary files /dev/null and b/textures/pyutest-sliced-potato.png differ