From 36fd52a0ae29d963363c45db0e812440ce535afb Mon Sep 17 00:00:00 2001
From: tchncs <tchncs@vivaldi.net>
Date: Tue, 22 Nov 2016 22:40:46 +0100
Subject: [PATCH] mystic_plant: spawn small lava_slime on_punch

---
 depends.txt   | 1 +
 plantlife.lua | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/depends.txt b/depends.txt
index f0c9272..ac5113f 100644
--- a/depends.txt
+++ b/depends.txt
@@ -3,6 +3,7 @@ farming
 stairs
 flowers
 doors
+mobs_slimes
 bakedclay?
 moreblocks?
 intllib?
diff --git a/plantlife.lua b/plantlife.lua
index 3387118..296711f 100644
--- a/plantlife.lua
+++ b/plantlife.lua
@@ -308,6 +308,10 @@ minetest.register_node("ethereal:mystic_plant", {
 		fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}
 	},
 	walkable = false,
+    on_punch =function(pos, node)
+        pos = {x=pos.x, y=pos.y+2, z=pos},
+        minetest.add_entity(pos, "mobs_slimes:lava_small")
+    end
 })
 
 minetest.register_node("ethereal:dornbush", {
-- 
GitLab