Spawn on nether:rack if nether mod available
This commit is contained in:
parent
a4d47e7e6b
commit
592e247c1c
4
mod.conf
4
mod.conf
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user