From d1c824e373cccb34f1221282349bf9dadd429b6d Mon Sep 17 00:00:00 2001 From: asl97 Date: Thu, 27 Aug 2015 04:11:55 +0800 Subject: [PATCH] Fixed excessive xp generation this slowly decrease the amount of exp rewarded as the amount get higher --- mods/adventuretest/register_functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/adventuretest/register_functions.lua b/mods/adventuretest/register_functions.lua index 0c41bb3..fd29926 100755 --- a/mods/adventuretest/register_functions.lua +++ b/mods/adventuretest/register_functions.lua @@ -66,7 +66,7 @@ local function adventuretest_dignode(pos, node, digger) local ppos = digger:getpos() -- every 100 give them some experience local multiplier = dug / 100 - local exp = 5 * multiplier + local exp = math.ceil(math.pow(5 * multiplier, 0.9)) local e = experience.exp_to_items(exp) for _,item in pairs(e) do default.drop_item(ppos,item) @@ -89,7 +89,7 @@ local function adventuretest_placenode(pos, node, placer) local ppos = placer:getpos() -- every 100 give them some experience local multiplier = placed / 100 - local exp = 5 * multiplier + local exp = math.ceil(math.pow(5 * multiplier, 0.9)) local e = experience.exp_to_items(exp) for _,item in pairs(e) do default.drop_item(ppos,item)