diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 20f4e6f26..80351e7db 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -516,3 +516,30 @@ minetest.register_on_item_eat(function (hp_change, replace_with_item, itemstack, end end ) + +-- Fish Buckets +fish_names = { + { techname = "cod", name = "Cod" }, + { techname = "salmon", name = "Salmon" } + --{ techname = "pufferfish", name = "Pufferfish" } FIXME: Uncomment when pufferfish mobs are added. + --{ techname = "tropical_fish", name = "Tropical Fish" } FIXME: Uncomment when pufferfish mobs are added. +} + +for _, fish in pairs(fish_names) do + mcl_buckets.register_liquid({ + bucketname = "mcl_fishing:bucket_" .. fish.techname, + source_place = function(pos) + minetest.add_entity(pos, "extra_mobs:" .. fish.techname) + return "mcl_core:water_source" + end, + source_take = {"extra_mobs:" .. fish.techname}, + inventory_image = fish.techname .. "_bucket.png", + name = S("Bucket of @1", S(fish.name)), + longdesc = S("This bucket is filled with water and @1.", S(fish.name)), + usagehelp = S("Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.", S(fish.name), S(fish.name)), + tt_help = S("Places a water source and a @1 fish.", S(fish.name)), + extra_check = function(pos, placer) + return true, true + end, + }) +end diff --git a/mods/ITEMS/mcl_fishing/locale/template.txt b/mods/ITEMS/mcl_fishing/locale/template.txt index a1544666b..32e3d8740 100644 --- a/mods/ITEMS/mcl_fishing/locale/template.txt +++ b/mods/ITEMS/mcl_fishing/locale/template.txt @@ -16,3 +16,9 @@ Pufferfish= Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).= Catches fish in water= Very poisonous= +Cod= +Salmon= +Bucket of @1= +This bucket is filled with water and @1.= +Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.= +Places a water source and a @1 fish.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_fishing/mod.conf b/mods/ITEMS/mcl_fishing/mod.conf index c4e5f5f2e..71bde6146 100644 --- a/mods/ITEMS/mcl_fishing/mod.conf +++ b/mods/ITEMS/mcl_fishing/mod.conf @@ -1,3 +1,3 @@ name = mcl_fishing description = Adds fish and fishing poles to go fishing. -depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors +depends = mcl_core, mcl_sounds, mcl_loot, mcl_mobs, mcl_enchanting, mcl_throwing, mcl_colors, mcl_buckets diff --git a/mods/ITEMS/mcl_fishing/textures/cod_bucket.png b/mods/ITEMS/mcl_fishing/textures/cod_bucket.png new file mode 100644 index 000000000..582207cb0 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/textures/cod_bucket.png differ diff --git a/mods/ITEMS/mcl_fishing/textures/pufferfish_bucket.png b/mods/ITEMS/mcl_fishing/textures/pufferfish_bucket.png new file mode 100644 index 000000000..2c88bac35 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/textures/pufferfish_bucket.png differ diff --git a/mods/ITEMS/mcl_fishing/textures/salmon_bucket.png b/mods/ITEMS/mcl_fishing/textures/salmon_bucket.png new file mode 100644 index 000000000..b9ac22fd9 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/textures/salmon_bucket.png differ diff --git a/mods/ITEMS/mcl_fishing/textures/tropical_fish_bucket.png b/mods/ITEMS/mcl_fishing/textures/tropical_fish_bucket.png new file mode 100644 index 000000000..edf7dd244 Binary files /dev/null and b/mods/ITEMS/mcl_fishing/textures/tropical_fish_bucket.png differ