mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-06-28 14:16:11 +02:00
Use proper creative mode check (#59)
This commit is contained in:
@ -64,7 +64,7 @@ minetest.register_node("dryplants:juncus", {
|
||||
else
|
||||
minetest.swap_node(right_here, {name="dryplants:juncus"})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.is_creative_enabled(playername) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
|
@ -318,7 +318,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||
collisionbox = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
|
||||
on_punch = function(self, puncher)
|
||||
if puncher:is_player() and puncher:get_inventory() then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.is_creative_enabled(puncher:get_player_name()) then
|
||||
puncher:get_inventory():add_item("main", "dryplants:reedmace_sapling")
|
||||
end
|
||||
self.object:remove()
|
||||
|
Reference in New Issue
Block a user