From 8536e2c033cf51ef99989d56e7c400fdc444f2f8 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 23 May 2021 13:33:36 +0200 Subject: [PATCH] [mcl_experience] fix warnings --- mods/HUD/mcl_experience/init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index b52611d5af..53376c63f7 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -1,5 +1,11 @@ local S = minetest.get_translator("mcl_experience") + mcl_experience = {} + +local vector = vector +local math = math +local string = string + local pool = {} local registered_nodes local max_xp = 2^31-1 @@ -262,7 +268,6 @@ function mcl_experience.add_experience(player, experience) if #final_candidates > 0 then local can = final_candidates[math.random(#final_candidates)] local stack, list, index, wear = can.stack, can.list, can.index, can.wear - local unbreaking_level = mcl_enchanting.get_enchantment(stack, "unbreaking") local uses = mcl_util.calculate_durability(stack) local multiplier = 2 * 65535 / uses local repair = experience * multiplier @@ -329,14 +334,12 @@ minetest.register_on_dieplayer(function(player) mcl_experience.throw_experience(player:get_pos(), xp_amount) end) - -local name local collector, pos, pos2 local direction, distance, player_velocity, goal local currentvel, acceleration, multiplier, velocity local node, vel, def local is_moving, is_slippery, slippery, slip_factor -local size, data +local size local function xp_step(self, dtime) --if item set to be collected then only execute go to player if self.collected == true then