mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 08:29:34 +01:00
If player in creative mode, don't drop experience from destroyed spawners
This commit is contained in:
parent
0a9be4b79c
commit
48b16a23b6
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue