From 04a81af4a13e6a179b2bbd45465695d5a2aa7eda Mon Sep 17 00:00:00 2001 From: Guy Liner Date: Wed, 5 Jan 2022 10:42:50 -0500 Subject: [PATCH] Make sure that the player is not in creative mode before giving them experience points --- mods/ITEMS/mcl_mobspawners/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_mobspawners/init.lua b/mods/ITEMS/mcl_mobspawners/init.lua index 0795fb611..37720e1e8 100644 --- a/mods/ITEMS/mcl_mobspawners/init.lua +++ b/mods/ITEMS/mcl_mobspawners/init.lua @@ -317,7 +317,12 @@ minetest.register_node("mcl_mobspawners:spawner", { if obj then obj:remove() end - mcl_experience.throw_xp(pos, math.random(15, 43)) + + --Make sure the player is not in creative mode before + --giving them xp + if not minetest.is_creative_enabled(name) then + mcl_experience.throw_xp(pos, math.random(15, 43)) + end end, on_punch = function(pos)