mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-10-04 03:03:05 +02:00
fix block randomizer when world time set to constant daytime
This commit is contained in:
parent
7bcb05516c
commit
c1fcef324d
2
init.lua
2
init.lua
@ -573,7 +573,7 @@ function lucky_block:open(pos, digger, blocks_list)
|
||||
blocks_list = blocks_list or lucky_list
|
||||
|
||||
-- make sure it's really random
|
||||
math.randomseed(minetest.get_timeofday() + pos.x + pos.z) -- os.time()
|
||||
math.randomseed(minetest.get_timeofday() + pos.x + pos.z - os.time())
|
||||
|
||||
local luck = math.random(1, #blocks_list) ; -- luck = 1
|
||||
local action = blocks_list[luck][1]
|
||||
|
Loading…
Reference in New Issue
Block a user