From 7ca26b4105c4e14d0dc924e4c1209d58a2478aa3 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Sat, 8 May 2021 11:53:32 -0700 Subject: [PATCH] Spawn on node nether:rack of nether mod available --- mod.conf | 1 + spawn.lua | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mod.conf b/mod.conf index 7bcae03..693b397 100644 --- a/mod.conf +++ b/mod.conf @@ -3,3 +3,4 @@ title = Sneeker description = An explosive nuisance. author = Rui depends = default, tnt +optional_depends = nether diff --git a/spawn.lua b/spawn.lua index 153106b..c1e6c07 100644 --- a/spawn.lua +++ b/spawn.lua @@ -1,6 +1,16 @@ +local spawn_nodes = { + "default:dirt_with_grass", + "default:stone", +} + +if core.global_exists("nether") then + table.insert(spawn_nodes, "nether:rack") +end + + core.register_abm({ - nodenames = {"default:dirt_with_grass", "default:stone"}, + nodenames = spawn_nodes, neighbors = {"air"}, interval = 30, chance = 9000,