1
0
Fork 0

If player in creative mode, don't drop experience from destroyed spawners

texture_conversion_wool
GuyLiner 2023-02-06 09:19:56 -05:00
parent 0a9be4b79c
commit 48b16a23b6
1 changed files with 5 additions and 1 deletions

View File

@ -317,7 +317,11 @@ 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)