<commit_before>-- FOOD MOD
-- A mod written by rubenwardy that adds
-- food to the minetest game
-- =====================================
-- >> food/ingredients.lua
-- Fallback ingredients
-- =====================================

food.module("wheat", function()
	minetest.register_craftitem("food:wheat", {
		description = S("Wheat"), 
		inventory_image = "food_wheat.png", 
		groups = {food_wheat=1}
	})

	food.craft({
		output = "food:wheat", 
		recipe = {
			{"default:dry_shrub"}, 
		}
	})
end, true)

food.module("flour", function()
	minetest.register_craftitem("food:flour", {
		description = S("Flour"), 
		inventory_image = "food_flour.png", 
		groups = {food_flour = 1}
	})
	food.craft({
		output = "food:flour", 
		recipe = {
			{"group:food_wheat"}, 
			{"group:food_wheat"}
		}
	})
	food.craft({
		output = "food:flour", 
		recipe = {
			{"default:sand"}, 
			{"default:sand"}
		}
	})
end, true)

food.module("potato", function()
	minetest.register_craftitem("food:potato", {
		description = S("Potato"), 
		inventory_image = "food_potato.png", 
		groups = {food_potato = 1}
	})
	food.craft({
		output = "food:potato", 
		recipe = {
			{"default:dirt"}, 
			{"default:apple"}

		}
	})
end, true)

food.module("tomato", function()
	minetest.register_craftitem("food:tomato", {
		description = S("Tomato"), 
		inventory_image = "food_tomato.png", 
		groups = {food_tomato = 1}
	})
	food.craft({
		output = "food:tomato", 
		recipe = {
			{"", "default:desert_sand", ""}, 
			{"default:desert_sand", "", "default:desert_sand"}, 
			{"", "default:desert_sand", ""}
		}
	})
end, true)

food.module("carrot", function()
	minetest.register_craftitem("food:carrot", {
		description = S("Carrot"), 
		inventory_image = "food_carrot.png", 
		groups = {food_carrot=1}, 
		on_use = food.item_eat(3)
	})
	food.craft({
		output = "food:carrot", 
		recipe = {
			{"default:apple", "default:apple", "default:apple"}, 
		}
	})
end, true)

food.module("milk", function()
	minetest.register_craftitem("food:milk", {
		description = S("Milk"), 
		image = "food_milk.png", 
		on_use = food.item_eat(1), 
		groups = { eatable=1, food_milk = 1 }, 
		stack_max=10
	})
	food.craft({
		output = "food:milk", 
		recipe = {
			{"default:sand"}, 
			{"bucket:bucket_water"}
		}, 
		replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}, 
	})
end, true)

food.module("egg", function()
	minetest.register_craftitem("food:egg", {
		description = S("Egg"), 
		inventory_image = "food_egg.png", 
		groups = {food_egg=1}
	})
	food.craft({
		output = "food:egg", 
		recipe = {
			{"", "default:sand", ""}, 
			{"default:sand", "", "default:sand"}, 
			{"", "default:sand", ""}
		}
	})
end, true)

food.module("cocoa", function()
	minetest.register_craftitem("food:cocoa", {
		description = S("Cocoa Bean"), 
		inventory_image = "food_cocoa.png", 
		groups = {food_cocoa=1}
	})
	food.craft({
		output = "food:cocoa", 
		recipe = {
			{"", "default:apple", ""}, 
			{"default:apple", "", "default:apple"}, 
			{"", "default:apple", ""}
		}
	})
end, true)

food.module("meat", function()
	minetest.register_craftitem("food:meat", {
		description = S("Venison"), 
		inventory_image = "food_meat.png", 
		groups = {food_meat=1, food_chicken=1}
	})	
	food.craft({
		type = "cooking", 
		output = "food:meat", 
		recipe = "group:food_meat_raw", 
		cooktime = 30
	})

	if not minetest.get_modpath("animalmaterials") then
		minetest.register_craftitem("food:meat_raw", {
			description = S("Raw meat"), 
			image = "food_meat_raw.png", 
			on_use = food.item_eat(1), 
			groups = { meat=1, eatable=1, food_meat_raw=1 }, 
			stack_max=25
		})
		food.craft({
			output = "food:meat_raw", 
			recipe = {
				{"default:apple"}, 
				{"default:dirt"}
			}
		})
	end
end, true)

food.module("sugar", function()
	minetest.register_craftitem("food:sugar", {<commit_msg>Changed silly crafts in food mod - Disabled and changed silly crafts in food mod which allowed players to craft food with sand, dry shrub, and such nodes<commit_after>-- FOOD MOD
-- A mod written by rubenwardy that adds
-- food to the minetest game
-- =====================================
-- >> food/ingredients.lua
-- Fallback ingredients
-- =====================================

food.module("wheat", function()
	minetest.register_craftitem("food:wheat", {
		description = S("Wheat"), 
		inventory_image = "food_wheat.png", 
		groups = {food_wheat=1}
	})
	food.craft({
		output = "food:potato", 
		recipe = {
			{"farming:wheat"}
		}, 
	})
end, true)

food.module("flour", function()
	minetest.register_craftitem("food:flour", {
		description = S("Flour"), 
		inventory_image = "food_flour.png", 
		groups = {food_flour = 1}
	})
	food.craft({
		output = "food:flour", 
		recipe = {
			{"group:food_wheat"}, 
			{"group:food_wheat"}
		}
	})
end, true)

food.module("potato", function()
	minetest.register_craftitem("food:potato", {
		description = S("Potato"), 
		inventory_image = "food_potato.png", 
		groups = {food_potato = 1}
	})
	food.craft({
		output = "food:potato", 
		recipe = {
			{"farming:potato"}
		}, 
	})
end, true)

food.module("tomato", function()
	minetest.register_craftitem("food:tomato", {
		description = S("Tomato"), 
		inventory_image = "food_tomato.png", 
		groups = {food_tomato = 1}
	})
	food.craft({
		output = "food:tomato", 
		recipe = {
			{"farming:tomato"}
		}, 
	})
end, true)

food.module("carrot", function()
	minetest.register_craftitem("food:carrot", {
		description = S("Carrot"), 
		inventory_image = "food_carrot.png", 
		groups = {food_carrot=1}, 
		on_use = food.item_eat(3)
	})
	food.craft({
		output = "food:carrot", 
		recipe = {
			{"farming:carrot"}
		}, 
	})
end, true)

food.module("milk", function()
	minetest.register_craftitem("food:milk", {
		description = S("Milk"), 
		image = "food_milk.png", 
		on_use = food.item_eat(1), 
		groups = { eatable=1, food_milk = 1 }, 
		stack_max=10
	})
	food.craft({
		output = "food:milk", 
		recipe = {
			{"mobs:bucket_milk"}
		}, 
	})
end, true)

food.module("egg", function()
	minetest.register_craftitem("food:egg", {
		description = S("Egg"), 
		inventory_image = "food_egg.png", 
		groups = {food_egg=1}
	})
	food.craft({
		output = "food:egg", 
		recipe = {
			{"mobs:egg"}
		}
	})
end, true)

food.module("cocoa", function()
	minetest.register_craftitem("food:cocoa", {
		description = S("Cocoa Bean"), 
		inventory_image = "food_cocoa.png", 
		groups = {food_cocoa=1}
	})
	food.craft({
		output = "food:cocoa", 
		recipe = {
			{"farming:cocoa_beans"}
		}
	})
end, true)

food.module("meat", function()
	minetest.register_craftitem("food:meat", {
		description = S("Venison"), 
		inventory_image = "food_meat.png", 
		groups = {food_meat=1, food_chicken=1}
	})	
	food.craft({
		type = "cooking", 
		output = "food:meat", 
		recipe = "group:food_meat_raw", 
		cooktime = 30
	})

	if not minetest.get_modpath("animalmaterials") then
		minetest.register_craftitem("food:meat_raw", {
			description = S("Raw meat"), 
			image = "food_meat_raw.png", 
			on_use = food.item_eat(1), 
			groups = { meat=1, eatable=1, food_meat_raw=1 }, 
			stack_max=25
		})
		food.craft({
			output = "food:meat_raw", 
			recipe = {
				{"mobs:meat_raw"}
			}
		})
	end
end, true)

food.module("sugar", function()
	minetest.register_craftitem("food:sugar", {
{'fraction_non_alphanumeric': 0.20159406348770098, 'fraction_numerical': 0.006321286244331455, 'mean_word_length': 4.026243093922652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4707053', 'n_tokens_mistral': 3179, 'n_tokens_neox': 2796, 'n_words': 459}