From ef633ce61771e28ebbfcdeeada162676ca593c4a Mon Sep 17 00:00:00 2001
From: ancientmarinerdev <ancientmariner_dev@proton.me>
Date: Thu, 16 Mar 2023 22:01:36 +0000
Subject: [PATCH] Do not throw XP if in creative

---
 mods/ENTITIES/mcl_mobs/physics.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua
index c6599a28b..956eb992c 100644
--- a/mods/ENTITIES/mcl_mobs/physics.lua
+++ b/mods/ENTITIES/mcl_mobs/physics.lua
@@ -493,7 +493,9 @@ function mob_class:check_for_death(cause, cmi_cause)
 
 				if not mcl_sculk.handle_death(pos, xp_amount) then
 					--minetest.log("Xp not thrown")
-					mcl_experience.throw_xp(pos, xp_amount)
+					if minetest.is_creative_enabled("") ~= true then
+						mcl_experience.throw_xp(pos, xp_amount)
+					end
 				else
 					--minetest.log("xp thrown")
 				end