Spawn on nether:rack if nether mod available

This commit is contained in:
Jordan Irwin 2021-05-06 21:11:18 -07:00
parent a4d47e7e6b
commit 592e247c1c
2 changed files with 8 additions and 3 deletions

@ -1,6 +1,6 @@
name = sneeker
title = Sneeker
description = Adds some explosive nuisance.
description = An explosive nuisance.
author = Rui
depends = default, tnt
optional_depends = spawneggs
optional_depends = spawneggs, nether

@ -26,8 +26,13 @@ sneeker.log("Spawn chance: " .. spawn_chance_percent)
sneeker.log("Spawn interval: " .. tostring(spawn_interval) .. " (" .. tostring(spawn_interval/60) .. " minute(s))")
sneeker.log("Maximum light value for spawn: " .. tostring(spawn_maxlight))
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 = spawn_interval,
chance = spawn_chance,