Buckets of Fish

This commit is contained in:
PrairieAstronomer 2022-06-08 13:07:01 -06:00
parent da4b867314
commit ebcadc415d
9 changed files with 44 additions and 1 deletions

View File

@ -95,6 +95,13 @@ local cod = {
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end
end
end,
on_rightclick = function(self, clicker)
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
self.object:remove()
clicker:set_wielded_item("mcl_fishing:bucket_cod")
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
end
end
}

View File

@ -55,6 +55,13 @@ local salmon = {
view_range = 16,
runaway = true,
fear_height = 4,
on_rightclick = function(self, clicker)
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
self.object:remove()
clicker:set_wielded_item("mcl_fishing:bucket_salmon")
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
end
end
}
mobs:register_mob("extra_mobs:salmon", salmon)

View File

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 296 B

View File

@ -253,6 +253,13 @@ awards.register_achievement("mcl:fishyBusiness", {
icon = "mcl_armor_inv_chestplate_netherite.png",
})]]--
-- Triggered in extra_mobs
awards.register_achievement("mcl:tacticalFishing", {
title = S("Tactical Fishing"),
description = S("Catch a fish... without a fishing rod!"),
icon = "pufferfish_bucket.png",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -512,3 +512,25 @@ minetest.register_on_item_eat(function (hp_change, replace_with_item, itemstack,
end
end )
-- Fish Buckets
fish_names = {"cod", "salmon"}
for _, fish in ipairs(fish_names) do
mcl_buckets.register_liquid({
bucketname = "mcl_fishing:bucket_" .. fish,
source_place = function(pos)
minetest.add_entity(pos, "extra_mobs:" .. fish)
return "mcl_core:water_source"
end,
source_take = {"extra_mobs:" .. fish},
inventory_image = fish .. "_bucket.png",
name = S("Bucket of " .. fish),
longdesc = S("This bucket is filled with water and " .. fish .. "."),
usagehelp = S("Place it to empty the bucket and place a " .. fish .. ". Obtain by right clicking on a " .. fish .. " fish with a bucket of water."),
tt_help = S("Places a water source and " .. fish .. "."),
extra_check = function(pos, placer)
return true, true
end,
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB