From 3b60a8eb1848eac7e72fde88e081881584d7cf36 Mon Sep 17 00:00:00 2001 From: JoseDouglas26 Date: Thu, 4 Jan 2024 16:19:50 -0300 Subject: [PATCH] Farming fortune drop bug fix --- mods/ITEMS/mcl_farming/carrots.lua | 7 +++++++ mods/ITEMS/mcl_farming/potatoes.lua | 7 +++++++ mods/ITEMS/mcl_farming/wheat.lua | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index f21285445..e8e295d8b 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -78,6 +78,13 @@ minetest.register_node("mcl_farming:carrot", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _mcl_fortune_drop = { + discrete_uniform_distribution = true, + items = {"mcl_farming:carrot_item"}, + min_count = 2, + max_count = 4, + cap = 5, + } }) minetest.register_craftitem("mcl_farming:carrot_item", { diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index e29219fd8..d3f4e4fc0 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -83,6 +83,13 @@ minetest.register_node("mcl_farming:potato", { groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _mcl_fortune_drop = { + discrete_uniform_distribution = true, + items = {"mcl_farming:potato_item"}, + min_count = 2, + max_count = 4, + cap = 5 + } }) minetest.register_craftitem("mcl_farming:potato_item", { diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index 15fd98e2a..676cc1301 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -89,6 +89,13 @@ minetest.register_node("mcl_farming:wheat", { dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1}, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, + _mcl_fortune_drop = { + discrete_uniform_distribution = true, + items = {"mcl_farming:wheat_seeds"}, + min_count = 1, + max_count = 6, + cap = 7 + } }) mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20)