forked from VoxeLibre/VoxeLibre
Make it possible to pick up fish with river water bucket
This commit is contained in:
parent
d4c2501d62
commit
bb73e5f1cd
|
@ -53,7 +53,8 @@ local axolotl = {
|
|||
fear_height = 4,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||
local bn = clicker:get_wielded_item():get_name()
|
||||
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||
if clicker:set_wielded_item("mcl_buckets:bucket_axolotl") then
|
||||
local it = clicker:get_wielded_item()
|
||||
local m = it:get_meta()
|
||||
|
|
|
@ -102,7 +102,8 @@ local cod = {
|
|||
end
|
||||
end,
|
||||
on_rightclick = function(self, clicker)
|
||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||
local bn = clicker:get_wielded_item():get_name()
|
||||
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||
self.object:remove()
|
||||
clicker:set_wielded_item("mcl_buckets:bucket_cod")
|
||||
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||
|
|
|
@ -58,7 +58,8 @@ local salmon = {
|
|||
runaway = true,
|
||||
fear_height = 4,
|
||||
on_rightclick = function(self, clicker)
|
||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||
local bn = clicker:get_wielded_item():get_name()
|
||||
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||
self.object:remove()
|
||||
clicker:set_wielded_item("mcl_buckets:bucket_salmon")
|
||||
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||
|
|
|
@ -103,7 +103,8 @@ local tropical_fish = {
|
|||
runaway = true,
|
||||
fear_height = 4,
|
||||
on_rightclick = function(self, clicker)
|
||||
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||
local bn = clicker:get_wielded_item():get_name()
|
||||
if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then
|
||||
if clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") then
|
||||
local it = clicker:get_wielded_item()
|
||||
local m = it:get_meta()
|
||||
|
|
|
@ -23,7 +23,11 @@ local function on_place_fish(itemstack, placer, pointed_thing)
|
|||
if props ~= "" then
|
||||
o:set_properties(minetest.deserialize(props))
|
||||
end
|
||||
minetest.set_node(pos,{name = "mcl_core:water_source"})
|
||||
local water = "mcl_core:water_source"
|
||||
if n.name == "mclx_core:river_water_source" then
|
||||
water = n.name
|
||||
end
|
||||
minetest.set_node(pos,{name = water})
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:set_name("mcl_buckets:bucket_empty")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue