forked from MineClone5/MineClone5
merge
This commit is contained in:
parent
c259fc2a28
commit
668b67158c
|
@ -242,15 +242,11 @@ WARNING: BIOME INTEGRATION NEEDED -> How to get biome through lua??
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
--this is where all of the spawning information is kept
|
--this is where all of the spawning information is kept
|
||||||
local spawn_dictionary = {
|
local spawn_dictionary = {}
|
||||||
["overworld"] = {},
|
|
||||||
["nether"] = {},
|
|
||||||
["end"] = {}
|
|
||||||
}
|
|
||||||
|
|
||||||
function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
||||||
|
|
||||||
print(dump(biomes))
|
--print(dump(biomes))
|
||||||
|
|
||||||
-- Do mobs spawn at all?
|
-- Do mobs spawn at all?
|
||||||
if not mobs_spawn then
|
if not mobs_spawn then
|
||||||
|
@ -438,6 +434,20 @@ function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_ligh
|
||||||
|
|
||||||
|
|
||||||
--load information into the spawn dictionary
|
--load information into the spawn dictionary
|
||||||
|
|
||||||
|
--allow for new dimensions to be auto added
|
||||||
|
--this will take extra time, a whole few nanoseconds
|
||||||
|
--but will allow modularity
|
||||||
|
if not spawn_dictionary[dimension] then
|
||||||
|
spawn_dictionary[dimension] = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
print("----")
|
||||||
|
print(name)
|
||||||
|
for _,added_biome in pairs(biomes) do
|
||||||
|
print(added_biome)
|
||||||
|
end
|
||||||
|
--[[
|
||||||
local key = #spawn_dictionary[dimension] + 1
|
local key = #spawn_dictionary[dimension] + 1
|
||||||
|
|
||||||
spawn_dictionary[dimension][key] = {}
|
spawn_dictionary[dimension][key] = {}
|
||||||
|
@ -452,7 +462,7 @@ function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_ligh
|
||||||
spawn_dictionary[dimension][key]["max_height"] = max_height
|
spawn_dictionary[dimension][key]["max_height"] = max_height
|
||||||
spawn_dictionary[dimension][key]["day_toggle"] = day_toggle
|
spawn_dictionary[dimension][key]["day_toggle"] = day_toggle
|
||||||
spawn_dictionary[dimension][key]["on_spawn"] = spawn_abm_action
|
spawn_dictionary[dimension][key]["on_spawn"] = spawn_abm_action
|
||||||
|
]]--
|
||||||
--[[
|
--[[
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = name .. " spawning",
|
label = name .. " spawning",
|
||||||
|
|
|
@ -109,7 +109,35 @@ mobs:register_mob("mobs_mc:killer_bunny", killer_bunny)
|
||||||
-- Mob spawning rules.
|
-- Mob spawning rules.
|
||||||
-- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out
|
-- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out
|
||||||
|
|
||||||
mobs:spawn_specific("mobs_mc:rabbit", "overworld", "ground", 9, minetest.LIGHT_MAX+1, 30, 15000, 8, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
|
mobs:spawn_specific(
|
||||||
|
"mobs_mc:rabbit",
|
||||||
|
"overworld",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"FlowerForest",
|
||||||
|
"Swampland",
|
||||||
|
"Taiga",
|
||||||
|
"ExtremeHills",
|
||||||
|
"BirchForest",
|
||||||
|
"MegaSpruceTaiga",
|
||||||
|
"MegaTaiga",
|
||||||
|
"ExtremeHills+",
|
||||||
|
"Forest",
|
||||||
|
"Plains",
|
||||||
|
"ColdTaiga",
|
||||||
|
"SunflowerPlains",
|
||||||
|
"RoofedForest",
|
||||||
|
"MesaPlateauFM_grasstop",
|
||||||
|
"ExtremeHillsM",
|
||||||
|
"BirchForestM",
|
||||||
|
},
|
||||||
|
9,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
15000,
|
||||||
|
8,
|
||||||
|
mobs_mc.spawn_height.overworld_min,
|
||||||
|
mobs_mc.spawn_height.overworld_max)
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
local spawn = {
|
local spawn = {
|
||||||
|
|
|
@ -146,8 +146,99 @@ mobs:register_mob("mobs_mc:villager_zombie", {
|
||||||
harmed_by_heal = true,
|
harmed_by_heal = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs:spawn_specific("mobs_mc:villager_zombie", "overworld", "ground", 0, 7, 30, 4090, 4, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
|
mobs:spawn_specific(
|
||||||
mobs:spawn_specific("mobs_mc:villager_zombie", "overworld", "ground", 0, 7, 30, 60000, 4, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
|
"mobs_mc:villager_zombie",
|
||||||
|
"overworld",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"FlowerForest_underground",
|
||||||
|
"JungleEdge_underground",
|
||||||
|
"StoneBeach_underground",
|
||||||
|
"MesaBryce_underground",
|
||||||
|
"Mesa_underground",
|
||||||
|
"RoofedForest_underground",
|
||||||
|
"Jungle_underground",
|
||||||
|
"Swampland_underground",
|
||||||
|
"MushroomIsland_underground",
|
||||||
|
"BirchForest_underground",
|
||||||
|
"Plains_underground",
|
||||||
|
"MesaPlateauF_underground",
|
||||||
|
"ExtremeHills_underground",
|
||||||
|
"MegaSpruceTaiga_underground",
|
||||||
|
"BirchForestM_underground",
|
||||||
|
"SavannaM_underground",
|
||||||
|
"MesaPlateauFM_underground",
|
||||||
|
"Desert_underground",
|
||||||
|
"Savanna_underground",
|
||||||
|
"Forest_underground",
|
||||||
|
"SunflowerPlains_underground",
|
||||||
|
"ColdTaiga_underground",
|
||||||
|
"IcePlains_underground",
|
||||||
|
"IcePlainsSpikes_underground",
|
||||||
|
"MegaTaiga_underground",
|
||||||
|
"Taiga_underground",
|
||||||
|
"ExtremeHills+_underground",
|
||||||
|
"JungleM_underground",
|
||||||
|
"ExtremeHillsM_underground",
|
||||||
|
"JungleEdgeM_underground",
|
||||||
|
"Mesa",
|
||||||
|
"FlowerForest",
|
||||||
|
"Swampland",
|
||||||
|
"Taiga",
|
||||||
|
"ExtremeHills",
|
||||||
|
"Jungle",
|
||||||
|
"Savanna",
|
||||||
|
"BirchForest",
|
||||||
|
"MegaSpruceTaiga",
|
||||||
|
"MegaTaiga",
|
||||||
|
"ExtremeHills+",
|
||||||
|
"Forest",
|
||||||
|
"Plains",
|
||||||
|
"Desert",
|
||||||
|
"ColdTaiga",
|
||||||
|
"MushroomIsland",
|
||||||
|
"IcePlainsSpikes",
|
||||||
|
"SunflowerPlains",
|
||||||
|
"IcePlains",
|
||||||
|
"RoofedForest",
|
||||||
|
"ExtremeHills+_snowtop",
|
||||||
|
"MesaPlateauFM_grasstop",
|
||||||
|
"JungleEdgeM",
|
||||||
|
"ExtremeHillsM",
|
||||||
|
"JungleM",
|
||||||
|
"BirchForestM",
|
||||||
|
"MesaPlateauF",
|
||||||
|
"MesaPlateauFM",
|
||||||
|
"MesaPlateauF_grasstop",
|
||||||
|
"MesaBryce",
|
||||||
|
"JungleEdge",
|
||||||
|
"SavannaM",
|
||||||
|
"FlowerForest_beach",
|
||||||
|
"Forest_beach",
|
||||||
|
"StoneBeach",
|
||||||
|
"ColdTaiga_beach_water",
|
||||||
|
"Taiga_beach",
|
||||||
|
"Savanna_beach",
|
||||||
|
"Plains_beach",
|
||||||
|
"ExtremeHills_beach",
|
||||||
|
"ColdTaiga_beach",
|
||||||
|
"Swampland_shore",
|
||||||
|
"MushroomIslandShore",
|
||||||
|
"JungleM_shore",
|
||||||
|
"Jungle_shore",
|
||||||
|
"MesaPlateauFM_sandlevel",
|
||||||
|
"MesaPlateauF_sandlevel",
|
||||||
|
"MesaBryce_sandlevel",
|
||||||
|
"Mesa_sandlevel",
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
7,
|
||||||
|
30,
|
||||||
|
4090,
|
||||||
|
4,
|
||||||
|
mobs_mc.spawn_height.overworld_min,
|
||||||
|
mobs_mc.spawn_height.overworld_max)
|
||||||
|
--mobs:spawn_specific("mobs_mc:villager_zombie", "overworld", "ground", 0, 7, 30, 60000, 4, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mobs:register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "mobs_mc_spawn_icon_zombie_villager.png", 0)
|
mobs:register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "mobs_mc_spawn_icon_zombie_villager.png", 0)
|
||||||
|
|
Loading…
Reference in New Issue