math.random can produce up to a maxint, updating requested range

This commit is contained in:
FaceDeer
2019-07-09 23:51:23 -06:00
parent bcc1d1d848
commit 8d30f718f7
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ minetest.register_craft({
-- This ensures consistent random maximum to bloodthorn growth
local max_bloodthorn_height = function(pos)
local next_seed = math.random(1, 1000000000)
local next_seed = math.random(1, 2^31)
math.randomseed(pos.x + pos.z * 2 ^ 8)
local output = math.random(3,6)
math.randomseed(next_seed)