mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 18:20:20 +01:00
changed capturing mobs with 'replacewith' item to override new mob eggs with information inside
This commit is contained in:
parent
6d059ef980
commit
62d00489b3
4
api.lua
4
api.lua
@ -3166,8 +3166,8 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso,
|
|||||||
local new_stack = ItemStack(mobname)
|
local new_stack = ItemStack(mobname)
|
||||||
|
|
||||||
-- add special mob egg with all mob information
|
-- add special mob egg with all mob information
|
||||||
-- unless 'force_take' is true for craftitems only
|
-- unless 'replacewith' contains new item to use
|
||||||
if not force_take then
|
if not replacewith then
|
||||||
|
|
||||||
new_stack = ItemStack(mobname .. "_set")
|
new_stack = ItemStack(mobname .. "_set")
|
||||||
|
|
||||||
|
2
api.txt
2
api.txt
@ -235,7 +235,7 @@ This function is generally called inside the on_rightclick section of the mob ap
|
|||||||
'chance_net' chance of capturing mob using net (1 to 100) 0 to disable
|
'chance_net' chance of capturing mob using net (1 to 100) 0 to disable
|
||||||
'chance_lasso' chance of capturing mob using magic lasso (1 to 100) 0 to disable
|
'chance_lasso' chance of capturing mob using magic lasso (1 to 100) 0 to disable
|
||||||
'force_take' take mob by force, even if tamed (true or false)
|
'force_take' take mob by force, even if tamed (true or false)
|
||||||
'replacewith' once captured replace mob with this item instead
|
'replacewith' once captured replace mob with this item instead (overrides new mob eggs with saved information)
|
||||||
|
|
||||||
|
|
||||||
mobs:feed_tame(self, clicker, feed_count, breed)
|
mobs:feed_tame(self, clicker, feed_count, breed)
|
||||||
|
Loading…
Reference in New Issue
Block a user