forked from VoxeLibre/VoxeLibre
Remove the ABMs
There are likely better ways to fix any palettes that the LBMs missed.
This commit is contained in:
parent
bfe4b2fd31
commit
4ddab8bdf1
|
@ -470,27 +470,6 @@ minetest.register_lbm({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Fix grass palette indexes missed", -- This ABM fixes any incorrect grass palette indexes which were missed. Likely to be any grass from a schematic.
|
|
||||||
name = "mcl_mapgen_core:fix_grass_palette_indexes missed",
|
|
||||||
nodenames = {"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"},
|
|
||||||
neighbors = {"mcl_core:dirt_with_grass", "mcl_flowers:tallgrass", "mcl_flowers:double_grass", "mcl_flowers:double_grass_top", "mcl_flowers:fern", "mcl_flowers:double_fern", "mcl_flowers:double_fern_top", "mcl_core:reeds", "mcl_core:dirt_with_grass_snow"},
|
|
||||||
interval = 60,
|
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node)
|
|
||||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
|
||||||
local biome_data = minetest.get_biome_data(pos)
|
|
||||||
local biome = biome_data.biome
|
|
||||||
local biome_name = minetest.get_biome_name(biome)
|
|
||||||
local reg_biome = minetest.registered_biomes[biome_name]
|
|
||||||
if node.param2 ~= reg_biome._mcl_grass_palette_index then
|
|
||||||
node.param2 = reg_biome._mcl_grass_palette_index
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "Fix foliage palette indexes", -- This LBM fixes any incorrect foliage palette indexes
|
label = "Fix foliage palette indexes", -- This LBM fixes any incorrect foliage palette indexes
|
||||||
name = "mcl_mapgen_core:fix_foliage_palette_indexes",
|
name = "mcl_mapgen_core:fix_foliage_palette_indexes",
|
||||||
|
@ -517,32 +496,3 @@ minetest.register_lbm({
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Fix foliage palette indexes missed", -- This ABM fixes any incorrect foliage palette indexes which were missed. Likely to be any foliage from a player sapling.
|
|
||||||
name = "mcl_mapgen_core:fix_foliage_palette_indexes missed",
|
|
||||||
nodenames = {"group:foliage_palette", "group:foliage_palette_wallmounted"},
|
|
||||||
neighbors = {"group:foliage_palette", "group:foliage_palette_wallmounted"},
|
|
||||||
interval = 60,
|
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node)
|
|
||||||
if mg_name ~= "v6" and mg_name ~= "singlenode" then
|
|
||||||
local biome_data = minetest.get_biome_data(pos)
|
|
||||||
local biome = biome_data.biome
|
|
||||||
local biome_name = minetest.get_biome_name(biome)
|
|
||||||
local reg_biome = minetest.registered_biomes[biome_name]
|
|
||||||
if node.param2 ~= reg_biome._mcl_foliage_palette_index and node.name ~= "mcl_core:vine" then
|
|
||||||
node.param2 = reg_biome._mcl_foliage_palette_index
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
elseif node.name == "mcl_core:vine" then
|
|
||||||
local biome_param2 = reg_biome._mcl_foliage_palette_index
|
|
||||||
local rotation_param2 = node.param2
|
|
||||||
local final_param2 = (biome_param2 * 8) + rotation_param2
|
|
||||||
if node.param2 ~= final_param2 and rotation_param2 < 6 then
|
|
||||||
node.param2 = final_param2
|
|
||||||
minetest.set_node(pos, node)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue