Add dry-colored grass/fern variants
@ -150,7 +150,9 @@ mobs_mc.override.replace = {
|
|||||||
-- Sheep eat grass
|
-- Sheep eat grass
|
||||||
sheep = {
|
sheep = {
|
||||||
{ "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 },
|
{ "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 },
|
||||||
|
{ "mcl_core:dirt_with_dry_grass", "mcl_core:dirt", -1 },
|
||||||
{ "mcl_flowers:tallgrass", "air", 0 },
|
{ "mcl_flowers:tallgrass", "air", 0 },
|
||||||
|
{ "mcl_flowers:tallgrass_dry", "air", 0 },
|
||||||
},
|
},
|
||||||
-- Silverfish populate stone, etc. with monster eggs
|
-- Silverfish populate stone, etc. with monster eggs
|
||||||
silverfish = {
|
silverfish = {
|
||||||
@ -195,13 +197,13 @@ mobs_mc.override.spawn = {
|
|||||||
grassland_savanna = { mobs_mc.override.items.grass_block, "group:sand", "mcl_core:sandstone", "mcl_core:redsandstone" },
|
grassland_savanna = { mobs_mc.override.items.grass_block, "group:sand", "mcl_core:sandstone", "mcl_core:redsandstone" },
|
||||||
desert = { "group:sand" },
|
desert = { "group:sand" },
|
||||||
jungle = { "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_flowers:fern", "mcl_core:vine" },
|
jungle = { "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_flowers:fern", "mcl_core:vine" },
|
||||||
snow = { "mcl_core:snow", "mcl_core:snowblock", "mcl_core:dirt_with_grass_snow" },
|
snow = { "mcl_core:snow", "mcl_core:snowblock", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow" },
|
||||||
-- End stone added for shulkers because End cities don't generate yet
|
-- End stone added for shulkers because End cities don't generate yet
|
||||||
end_city = { "mcl_end:end_stone", "mcl_end:purpur_block" },
|
end_city = { "mcl_end:end_stone", "mcl_end:purpur_block" },
|
||||||
nether = { "mcl_nether:netherrack", "mcl_nether:quartz_ore" },
|
nether = { "mcl_nether:netherrack", "mcl_nether:quartz_ore" },
|
||||||
-- Netherrack added because there are no Nether fortresses yet. TODO: Remove netherrac from list as soon they're available
|
-- Netherrack added because there are no Nether fortresses yet. TODO: Remove netherrac from list as soon they're available
|
||||||
nether_fortress = { "mcl_nether:nether_brick", "mcl_nether:netherrack" },
|
nether_fortress = { "mcl_nether:nether_brick", "mcl_nether:netherrack" },
|
||||||
wolf = { mobs_mc.override.items.grass_block, "mcl_core:dirt", "mcl_core:dirt_with_grass_snow", "mcl_core:snow", "mcl_core:snowblock", "mcl_core:podzol" },
|
wolf = { mobs_mc.override.items.grass_block, "mcl_core:dirt", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow", "mcl_core:snow", "mcl_core:snowblock", "mcl_core:podzol" },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- This table contains important spawn height references for the mob spawn height.
|
-- This table contains important spawn height references for the mob spawn height.
|
||||||
|
@ -645,7 +645,7 @@ local grass_spread_randomizer = PseudoRandom(minetest.get_mapgen_setting("seed")
|
|||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Grass Block and Mycelium spread",
|
label = "Grass Block and Mycelium spread",
|
||||||
nodenames = {"mcl_core:dirt"},
|
nodenames = {"mcl_core:dirt"},
|
||||||
neighbors = {"air", "mcl_core:dirt_with_grass", "mcl_core:mycelium"},
|
neighbors = {"air", "group:grass_block", "mcl_core:mycelium"},
|
||||||
interval = 30,
|
interval = 30,
|
||||||
chance = 20,
|
chance = 20,
|
||||||
catch_up = false,
|
catch_up = false,
|
||||||
@ -1190,6 +1190,12 @@ end
|
|||||||
-- of the snowed node.
|
-- of the snowed node.
|
||||||
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds)
|
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds)
|
||||||
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
||||||
|
local create_doc_alias
|
||||||
|
if def.description then
|
||||||
|
create_doc_alias = true
|
||||||
|
else
|
||||||
|
create_doc_alias = false
|
||||||
|
end
|
||||||
-- Just some group clearing
|
-- Just some group clearing
|
||||||
def.description = nil
|
def.description = nil
|
||||||
def._doc_items_longdesc = nil
|
def._doc_items_longdesc = nil
|
||||||
@ -1224,7 +1230,7 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti
|
|||||||
-- Register stuff
|
-- Register stuff
|
||||||
minetest.register_node(itemstring_snowed, def)
|
minetest.register_node(itemstring_snowed, def)
|
||||||
|
|
||||||
if minetest.get_modpath("doc") then
|
if create_doc_alias and minetest.get_modpath("doc") then
|
||||||
doc.add_entry_alias("nodes", itemstring_clear, "nodes", itemstring_snowed)
|
doc.add_entry_alias("nodes", itemstring_clear, "nodes", itemstring_snowed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -295,6 +295,7 @@ minetest.register_node("mcl_core:diorite_smooth", {
|
|||||||
_mcl_hardness = 1.5,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Grass Block
|
||||||
minetest.register_node("mcl_core:dirt_with_grass", {
|
minetest.register_node("mcl_core:dirt_with_grass", {
|
||||||
description = "Grass Block",
|
description = "Grass Block",
|
||||||
_doc_items_longdesc = "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.",
|
_doc_items_longdesc = "A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.",
|
||||||
@ -302,7 +303,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
|||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1,shovely=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1},
|
groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1},
|
||||||
drop = 'mcl_core:dirt',
|
drop = 'mcl_core:dirt',
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults({
|
sounds = mcl_sounds.node_sound_dirt_defaults({
|
||||||
footstep = {name="default_grass_footstep", gain=0.4},
|
footstep = {name="default_grass_footstep", gain=0.4},
|
||||||
@ -314,6 +315,29 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
|||||||
})
|
})
|
||||||
mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass")
|
mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass")
|
||||||
|
|
||||||
|
-- Grass Block variant for dry biomes
|
||||||
|
minetest.register_node("mcl_core:dirt_with_dry_grass", {
|
||||||
|
_doc_items_create_entry = false,
|
||||||
|
tiles = {"default_dry_grass.png", "default_dirt.png", "default_dirt.png^default_dry_grass_side.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
stack_max = 64,
|
||||||
|
groups = {handy=1,shovely=1, grass_block=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, not_in_creative_inventory=1},
|
||||||
|
drop = 'mcl_core:dirt',
|
||||||
|
sounds = mcl_sounds.node_sound_dirt_defaults({
|
||||||
|
footstep = {name="default_grass_footstep", gain=0.4},
|
||||||
|
}),
|
||||||
|
on_construct = mcl_core.on_snowable_construct,
|
||||||
|
_mcl_snowed = "mcl_core:dirt_with_dry_grass_snow",
|
||||||
|
_mcl_blast_resistance = 3,
|
||||||
|
_mcl_hardness = 0.6,
|
||||||
|
})
|
||||||
|
mcl_core.register_snowed_node("mcl_core:dirt_with_dry_grass_snow", "mcl_core:dirt_with_dry_grass")
|
||||||
|
|
||||||
|
if minetest.get_modpath("doc") then
|
||||||
|
doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_core:dirt_with_grass", "nodes", "mcl_core:dirt_with_dry_grass_snow")
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("mcl_core:grass_path", {
|
minetest.register_node("mcl_core:grass_path", {
|
||||||
tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
|
tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
|
||||||
description = "Grass Path",
|
description = "Grass Path",
|
||||||
|
@ -112,7 +112,7 @@ local register_sapling = function(subname, description, longdesc, texture, selbo
|
|||||||
local node_below = minetest.get_node_or_nil({x=pos.x,y=pos.y-1,z=pos.z})
|
local node_below = minetest.get_node_or_nil({x=pos.x,y=pos.y-1,z=pos.z})
|
||||||
if not node_below then return false end
|
if not node_below then return false end
|
||||||
local nn = node_below.name
|
local nn = node_below.name
|
||||||
return (nn=="mcl_core:dirt_with_grass" or nn=="mcl_core:dirt_with_grass_snow" or
|
return ((minetest.get_item_group(nn, "grass_block") == 1) or
|
||||||
nn=="mcl_core:podzol" or nn=="mcl_core:podzol_snow" or
|
nn=="mcl_core:podzol" or nn=="mcl_core:podzol_snow" or
|
||||||
nn=="mcl_core:dirt")
|
nn=="mcl_core:dirt")
|
||||||
end),
|
end),
|
||||||
|
BIN
mods/ITEMS/mcl_core/textures/default_dry_grass.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
mods/ITEMS/mcl_core/textures/default_dry_grass_side.png
Normal file
After Width: | Height: | Size: 183 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 306 B |
@ -137,7 +137,7 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||||||
|
|
||||||
-- Must be on a dirt-type block
|
-- Must be on a dirt-type block
|
||||||
local below = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
|
local below = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
|
||||||
if below.name ~= "mcl_core:mycelium" and below.name ~= "mcl_core:dirt" and below.name ~= "mcl_core:dirt_with_grass" and below.name ~= "mcl_core:coarse_dirt" and below.name ~= "mcl_core:podzol" then
|
if below.name ~= "mcl_core:mycelium" and below.name ~= "mcl_core:dirt" and minetest.get_item_group(below.name, "grass_block") ~= 1 and below.name ~= "mcl_core:coarse_dirt" and below.name ~= "mcl_core:podzol" then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||||||
-- Cocoa: Advance by 1 stage
|
-- Cocoa: Advance by 1 stage
|
||||||
mcl_cocoas.grow(pos)
|
mcl_cocoas.grow(pos)
|
||||||
return true
|
return true
|
||||||
elseif n.name == "mcl_core:dirt_with_grass" or n.name == "mcl_core:dirt_with_grass_snow" then
|
elseif minetest.get_item_group(n.name, "grass_block") == 1 then
|
||||||
-- Grass Block: Generate tall grass and random flowers all over the place
|
-- Grass Block: Generate tall grass and random flowers all over the place
|
||||||
for i = -2, 2 do
|
for i = -2, 2 do
|
||||||
for j = -2, 2 do
|
for j = -2, 2 do
|
||||||
@ -215,12 +215,16 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||||||
n = minetest.get_node(pos)
|
n = minetest.get_node(pos)
|
||||||
local n2 = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
|
local n2 = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||||
|
|
||||||
if n.name ~= "" and n.name == "air" and (n2.name == "mcl_core:dirt_with_grass" or n2.name == "mcl_core:dirt_with_grass_snow") then
|
if n.name ~= "" and n.name == "air" and (minetest.get_item_group(n2.name, "grass_block") == 1) and (minetest.get_item_group(n2.name, "snowed") == 0) then
|
||||||
-- Randomly generate flowers, tall grass or nothing
|
-- Randomly generate flowers, tall grass or nothing
|
||||||
if math.random(1,100) <= 90 then
|
if math.random(1,100) <= 90 then
|
||||||
-- 90% tall grass, 10% flower
|
-- 90% tall grass, 10% flower
|
||||||
if math.random(1,100) <= 90 then
|
if math.random(1,100) <= 90 then
|
||||||
minetest.add_node(pos, {name="mcl_core:tallgrass"})
|
if n2.name == "mcl_core:dirt_with_dry_grass" then
|
||||||
|
minetest.add_node(pos, {name="mcl_flowers:tallgrass_dry"})
|
||||||
|
else
|
||||||
|
minetest.add_node(pos, {name="mcl_flowers:tallgrass"})
|
||||||
|
end
|
||||||
else
|
else
|
||||||
minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]})
|
minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]})
|
||||||
end
|
end
|
||||||
@ -253,6 +257,14 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||||||
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top" })
|
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top" })
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
elseif n.name == "mcl_flowers:tallgrass_dry" then
|
||||||
|
local toppos = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||||
|
local topnode = minetest.get_node(toppos)
|
||||||
|
if minetest.registered_nodes[topnode.name].buildable_to then
|
||||||
|
minetest.set_node(pos, { name = "mcl_flowers:double_grass_dry" })
|
||||||
|
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_dry_top" })
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
elseif n.name == "mcl_flowers:fern" then
|
elseif n.name == "mcl_flowers:fern" then
|
||||||
-- Fern: Grow into large fern
|
-- Fern: Grow into large fern
|
||||||
@ -263,6 +275,14 @@ mcl_dye.apply_bone_meal = function(pointed_thing)
|
|||||||
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top" })
|
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top" })
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
elseif n.name == "mcl_flowers:fern_dry" then
|
||||||
|
local toppos = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||||
|
local topnode = minetest.get_node(toppos)
|
||||||
|
if minetest.registered_nodes[topnode.name].buildable_to then
|
||||||
|
minetest.set_node(pos, { name = "mcl_flowers:double_fern_dry" })
|
||||||
|
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_dry_top" })
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
@ -322,7 +322,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
|||||||
floor = minetest.get_node(floorpos)
|
floor = minetest.get_node(floorpos)
|
||||||
local block = minetest.get_node(blockpos)
|
local block = minetest.get_node(blockpos)
|
||||||
local soilgroup = minetest.get_item_group(floor.name, "soil")
|
local soilgroup = minetest.get_item_group(floor.name, "soil")
|
||||||
if not ((floor.name=="mcl_core:dirt_with_grass" or floor.name=="mcl_core:dirt_with_grass_snow" or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
|
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
|
||||||
table.remove(neighbors, n)
|
table.remove(neighbors, n)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,7 +22,7 @@ local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos,
|
|||||||
if (light_night and light_night >= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then
|
if (light_night and light_night >= 8) or (light_day and light_day >= minetest.LIGHT_MAX) then
|
||||||
light_ok = true
|
light_ok = true
|
||||||
end
|
end
|
||||||
return (soil_node.name == "mcl_core:dirt" or soil_node.name == "mcl_core:dirt_with_grass" or soil_node.name == "mcl_core:dirt_with_grass_snow" or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_core:podzol" or soil_node.name == "mcl_core:podzol_snow") and light_ok
|
return (soil_node.name == "mcl_core:dirt" or minetest.get_item_group(soil_node.name, "grass_block") == 1 or soil_node.name == "mcl_core:coarse_dirt" or soil_node.name == "mcl_core:podzol" or soil_node.name == "mcl_core:podzol_snow") and light_ok
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function add_simple_flower(name, desc, image, simple_selection_box)
|
local function add_simple_flower(name, desc, image, simple_selection_box)
|
||||||
@ -74,16 +74,40 @@ local wheat_seed_drop = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Tall Grass
|
-- Tall Grass and Fern
|
||||||
minetest.register_node("mcl_flowers:tallgrass", {
|
for i=1,2 do
|
||||||
|
-- CHECKME: How does tall grass behave when pushed by a piston?
|
||||||
|
local tgf_groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1}
|
||||||
|
|
||||||
|
local id, idf, longdesc, longdesc_fern, create_entry, shears_drop, shears_drop_fern
|
||||||
|
if i==1 then
|
||||||
|
id = "tallgrass"
|
||||||
|
idf = "fern"
|
||||||
|
longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high."
|
||||||
|
longdesc_fern = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high."
|
||||||
|
hidden = false
|
||||||
|
shears_drop = true
|
||||||
|
shears_drop_fern = true
|
||||||
|
else
|
||||||
|
id = "tallgrass_dry"
|
||||||
|
idf = "fern_dry"
|
||||||
|
tgf_groups.not_in_creative_inventory = 1
|
||||||
|
create_entry = false
|
||||||
|
shears_drop = {"mcl_flowers:tallgrass"}
|
||||||
|
shears_drop_fern = {"mcl_flowers:fern"}
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Tall Grass ---
|
||||||
|
minetest.register_node("mcl_flowers:"..id, {
|
||||||
description = "Tall Grass",
|
description = "Tall Grass",
|
||||||
_doc_items_longdesc = "Tall grass is a small plant which often occours on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.",
|
|
||||||
_doc_items_hidden = false,
|
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
|
_doc_items_longdesc = longdesc,
|
||||||
|
_doc_items_hidden = hidden,
|
||||||
|
_doc_items_create_entry = create_entry,
|
||||||
waving = 1,
|
waving = 1,
|
||||||
tiles = {"mcl_flowers_tallgrass.png"},
|
tiles = {"mcl_flowers_"..id..".png"},
|
||||||
inventory_image = "mcl_flowers_tallgrass.png",
|
inventory_image = "mcl_flowers_"..id..".png",
|
||||||
wield_image = "mcl_flowers_tallgrass.png",
|
wield_image = "mcl_flowers_"..id..".png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {{ -6/16, -8/16, -6/16, 6/16, 8/16, 6/16 }},
|
fixed = {{ -6/16, -8/16, -6/16, 6/16, 8/16, 6/16 }},
|
||||||
@ -93,11 +117,10 @@ minetest.register_node("mcl_flowers:tallgrass", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
-- CHECKME: How does tall grass behave when pushed by a piston?
|
groups = tgf_groups,
|
||||||
groups = {dig_immediate=3, flammable=3,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1},
|
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
drop = wheat_seed_drop,
|
drop = wheat_seed_drop,
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = shears_drop,
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
on_place = on_place_flower,
|
on_place = on_place_flower,
|
||||||
_mcl_blast_resistance = 0,
|
_mcl_blast_resistance = 0,
|
||||||
@ -105,37 +128,42 @@ minetest.register_node("mcl_flowers:tallgrass", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
--- Fern ---
|
--- Fern ---
|
||||||
minetest.register_node("mcl_flowers:fern", {
|
minetest.register_node("mcl_flowers:"..idf, {
|
||||||
description = "Fern",
|
description = "Fern",
|
||||||
_doc_items_longdesc = "Ferns are small plants which occour naturally in grasslands. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.",
|
_doc_items_longdesc = longdesc_fern,
|
||||||
|
_doc_items_create_entry = create_entry,
|
||||||
|
_doc_items_hidden = hidden,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
waving = 1,
|
waving = 1,
|
||||||
tiles = { "mcl_flowers_fern.png" },
|
tiles = { "mcl_flowers_"..idf..".png" },
|
||||||
inventory_image = "mcl_flowers_fern.png",
|
inventory_image = "mcl_flowers_"..idf..".png",
|
||||||
wield_image = "mcl_flowers_fern.png",
|
wield_image = "mcl_flowers_"..idf..".png",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
-- CHECKME: How does a fern behave when pushed by a piston?
|
groups = tgf_groups,
|
||||||
groups = {dig_immediate=3,flammable=2,attached_node=1,plant=1,place_flowerlike=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1},
|
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
on_place = on_place_flower,
|
on_place = on_place_flower,
|
||||||
drop = wheat_seed_drop,
|
drop = wheat_seed_drop,
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = shears_drop_fern,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -4/16, -0.5, -4/16, 4/16, 7/16, 4/16 },
|
fixed = { -4/16, -0.5, -4/16, 4/16, 7/16, 4/16 },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:tallgrass", "nodes", "mcl_flowers:tallgrass_dry")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:fern", "nodes", "mcl_flowers:fern_dry")
|
||||||
|
|
||||||
local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower)
|
local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_img, selbox_radius, selbox_top_height, drop, shears_drop, is_flower)
|
||||||
if not inv_img then
|
if not inv_img then
|
||||||
inv_img = top_img
|
inv_img = top_img
|
||||||
end
|
end
|
||||||
local flowergroup, usagehelp
|
local flowergroup, usagehelp, noncreative, create_entry
|
||||||
if is_flower == nil then
|
if is_flower == nil then
|
||||||
is_flower = true
|
is_flower = true
|
||||||
end
|
end
|
||||||
@ -143,6 +171,11 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||||||
flowergroup = 1
|
flowergroup = 1
|
||||||
usagehelp = flowerusagehelp
|
usagehelp = flowerusagehelp
|
||||||
end
|
end
|
||||||
|
if longdesc == nil then
|
||||||
|
noncreative = 1
|
||||||
|
create_entry = false
|
||||||
|
usagehelp = nil
|
||||||
|
end
|
||||||
-- Drop itself by default
|
-- Drop itself by default
|
||||||
local drop_bottom, drop_top
|
local drop_bottom, drop_top
|
||||||
if not drop then
|
if not drop then
|
||||||
@ -153,6 +186,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||||||
end
|
end
|
||||||
minetest.register_node("mcl_flowers:"..name, {
|
minetest.register_node("mcl_flowers:"..name, {
|
||||||
description = desc,
|
description = desc,
|
||||||
|
_doc_items_create_entry = create_entry,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
_doc_items_usagehelp = usagehelp,
|
_doc_items_usagehelp = usagehelp,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
@ -217,7 +251,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||||||
-- * Allowed on dirt or grass block
|
-- * Allowed on dirt or grass block
|
||||||
-- * Only with light level >= 8
|
-- * Only with light level >= 8
|
||||||
-- * Only if two enough space
|
-- * Only if two enough space
|
||||||
if (floorname == "mcl_core:dirt" or floorname == "mcl_core:dirt_with_grass" or floorname == "mcl_core:dirt_with_grass_snow" or floorname == "mcl_core:coarse_dirt" or floorname == "mcl_core:podzol" or floorname == "mcl_core:podzol_snow") and bottom_buildable and top_buildable and light_ok then
|
if (floorname == "mcl_core:dirt" or minetest.get_item_group(floorname, "grass_block") == 1 or floorname == "mcl_core:coarse_dirt" or floorname == "mcl_core:podzol" or floorname == "mcl_core:podzol_snow") and bottom_buildable and top_buildable and light_ok then
|
||||||
-- Success! We can now place the flower
|
-- Success! We can now place the flower
|
||||||
minetest.sound_play(minetest.registered_nodes["mcl_flowers:"..name].sounds.place, {pos = bottom, gain=1})
|
minetest.sound_play(minetest.registered_nodes["mcl_flowers:"..name].sounds.place, {pos = bottom, gain=1})
|
||||||
minetest.set_node(bottom, {name="mcl_flowers:"..name})
|
minetest.set_node(bottom, {name="mcl_flowers:"..name})
|
||||||
@ -236,7 +270,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||||||
minetest.remove_node(top)
|
minetest.remove_node(top)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = {dig_immediate=3,flammable=2,flower=flowergroup,place_flowerlike=1,non_mycelium_plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1},
|
groups = {dig_immediate=3,flammable=2,flower=flowergroup,place_flowerlike=1,non_mycelium_plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1, plant=1,double_plant=1,deco_block=1,not_in_creative_inventory=noncreative},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -268,8 +302,9 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
|||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") and longdesc then
|
||||||
doc.add_entry_alias("nodes", "mcl_flowers:"..name, "nodes", "mcl_flowers:"..name.."_top")
|
doc.add_entry_alias("nodes", "mcl_flowers:"..name, "nodes", "mcl_flowers:"..name.."_top")
|
||||||
|
-- If no longdesc, help alias must be added manually
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -281,8 +316,24 @@ add_large_plant("lilac", "Lilac", "A lilac is a large plant which occupies two b
|
|||||||
-- TODO: Make the sunflower face East. Requires a mesh for the top node.
|
-- TODO: Make the sunflower face East. Requires a mesh for the top node.
|
||||||
add_large_plant("sunflower", "Sunflower", "A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.", "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 3/16, 4/16)
|
add_large_plant("sunflower", "Sunflower", "A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.", "mcl_flowers_double_plant_sunflower_bottom.png", "mcl_flowers_double_plant_sunflower_top.png^mcl_flowers_double_plant_sunflower_front.png", "mcl_flowers_double_plant_sunflower_front.png", 3/16, 4/16)
|
||||||
|
|
||||||
add_large_plant("double_grass", "Double Tallgrass", "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.", "mcl_flowers_double_plant_grass_bottom.png", "mcl_flowers_double_plant_grass_top.png", nil, 5/16, 7/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false)
|
for i=1, 2 do
|
||||||
add_large_plant("double_fern", "Large Fern", "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.", "mcl_flowers_double_plant_fern_bottom.png", "mcl_flowers_double_plant_fern_top.png", nil, 6/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false)
|
local longdesc_grass, longdesc_fern, dry
|
||||||
|
if i==1 then
|
||||||
|
longdesc_grass = "Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds."
|
||||||
|
longdesc_fern = "Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds."
|
||||||
|
dry = ""
|
||||||
|
else
|
||||||
|
-- ID/texture name modifier
|
||||||
|
dry = "_dry"
|
||||||
|
end
|
||||||
|
add_large_plant("double_grass"..dry, "Double Tallgrass", longdesc_grass, "mcl_flowers_double_plant_grass_bottom"..dry..".png", "mcl_flowers_double_plant_grass_top"..dry..".png", nil, 5/16, 7/16, wheat_seed_drop, {"mcl_flowers:tallgrass 2"}, false)
|
||||||
|
add_large_plant("double_fern"..dry, "Large Fern", longdesc_fern, "mcl_flowers_double_plant_fern_bottom"..dry..".png", "mcl_flowers_double_plant_fern_top"..dry..".png", nil, 6/16, 5/16, wheat_seed_drop, {"mcl_flowers:fern 2"}, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:double_grass", "nodes", "mcl_flowers:double_grass_dry_top")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry")
|
||||||
|
doc.add_entry_alias("nodes", "mcl_flowers:double_fern", "nodes", "mcl_flowers:double_fern_dry_top")
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Pop out flowers",
|
label = "Pop out flowers",
|
||||||
@ -299,7 +350,7 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Pop out flower if not on dirt, grass block or too low brightness
|
-- Pop out flower if not on dirt, grass block or too low brightness
|
||||||
if (below.name ~= "mcl_core:dirt" and below.name ~= "mcl_core:dirt_with_grass" and below.name ~= "mcl_core:dirt_with_grass_snow") or (minetest.get_node_light(pos, 0.5) < 8) then
|
if (below.name ~= "mcl_core:dirt" and minetest.get_item_group(below.name, "grass_block") ~= 1) or (minetest.get_node_light(pos, 0.5) < 8) then
|
||||||
minetest.dig_node(pos)
|
minetest.dig_node(pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 166 B |
After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 202 B |
BIN
mods/ITEMS/mcl_flowers/textures/mcl_flowers_fern_dry.png
Normal file
After Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 196 B |
BIN
mods/ITEMS/mcl_flowers/textures/mcl_flowers_tallgrass_dry.png
Normal file
After Width: | Height: | Size: 196 B |
@ -170,7 +170,7 @@ local make_grass_path = function(itemstack, placer, pointed_thing)
|
|||||||
if pointed_thing.above.y < pointed_thing.under.y then
|
if pointed_thing.above.y < pointed_thing.under.y then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if (node.name == "mcl_core:dirt_with_grass" or node.name == "mcl_core:dirt_with_grass_snow") then
|
if (minetest.get_item_group(node.name, "grass_block") == 1) then
|
||||||
local above = table.copy(pointed_thing.under)
|
local above = table.copy(pointed_thing.under)
|
||||||
above.y = above.y + 1
|
above.y = above.y + 1
|
||||||
if minetest.get_node(above).name == "air" then
|
if minetest.get_node(above).name == "air" then
|
||||||
|
@ -21,7 +21,9 @@ wieldview.transform = {
|
|||||||
["mcl_flowers:blue_orchid"]="R270",
|
["mcl_flowers:blue_orchid"]="R270",
|
||||||
["mcl_flowers:oxeye_daisy"]="R270",
|
["mcl_flowers:oxeye_daisy"]="R270",
|
||||||
["mcl_flowers:fern"]="R270",
|
["mcl_flowers:fern"]="R270",
|
||||||
|
["mcl_flowers:fern_dry"]="R270",
|
||||||
["mcl_flowers:tallgrass"]="R270",
|
["mcl_flowers:tallgrass"]="R270",
|
||||||
|
["mcl_flowers:tallgrass_dry"]="R270",
|
||||||
["mcl_buckets:bucket_empty"]="R270",
|
["mcl_buckets:bucket_empty"]="R270",
|
||||||
["mcl_buckets:bucket_water"]="R270",
|
["mcl_buckets:bucket_water"]="R270",
|
||||||
["mcl_buckets:bucket_lava"]="R270",
|
["mcl_buckets:bucket_lava"]="R270",
|
||||||
|
@ -811,7 +811,7 @@ local function register_biomes()
|
|||||||
-- This is a plateau for grass blocks, tall grass, coarse dirt and oaks.
|
-- This is a plateau for grass blocks, tall grass, coarse dirt and oaks.
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "MesaPlateauF_grasstop",
|
name = "MesaPlateauF_grasstop",
|
||||||
node_top = "mcl_core:dirt_with_grass",
|
node_top = "mcl_core:dirt_with_dry_grass",
|
||||||
depth_top = 1,
|
depth_top = 1,
|
||||||
node_filler = "mcl_core:dirt",
|
node_filler = "mcl_core:dirt",
|
||||||
filler_depth = 1,
|
filler_depth = 1,
|
||||||
@ -854,7 +854,7 @@ local function register_biomes()
|
|||||||
-- Savanna
|
-- Savanna
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "Savanna",
|
name = "Savanna",
|
||||||
node_top = "mcl_core:dirt_with_grass",
|
node_top = "mcl_core:dirt_with_dry_grass",
|
||||||
depth_top = 1,
|
depth_top = 1,
|
||||||
node_filler = "mcl_core:dirt",
|
node_filler = "mcl_core:dirt",
|
||||||
depth_filler = 2,
|
depth_filler = 2,
|
||||||
@ -897,7 +897,7 @@ local function register_biomes()
|
|||||||
-- Otherwise identical to Savanna
|
-- Otherwise identical to Savanna
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "SavannaM",
|
name = "SavannaM",
|
||||||
node_top = "mcl_core:dirt_with_grass",
|
node_top = "mcl_core:dirt_with_dry_grass",
|
||||||
depth_top = 1,
|
depth_top = 1,
|
||||||
node_filler = "mcl_core:coarse_dirt",
|
node_filler = "mcl_core:coarse_dirt",
|
||||||
depth_filler = 3,
|
depth_filler = 3,
|
||||||
@ -1239,7 +1239,7 @@ local function register_biomelike_ores()
|
|||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "sheet",
|
ore_type = "sheet",
|
||||||
ore = "mcl_core:coarse_dirt",
|
ore = "mcl_core:coarse_dirt",
|
||||||
wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
|
||||||
column_height_max = 1,
|
column_height_max = 1,
|
||||||
column_midpoint_factor = 0.0,
|
column_midpoint_factor = 0.0,
|
||||||
y_min = mcl_vars.mg_overworld_min,
|
y_min = mcl_vars.mg_overworld_min,
|
||||||
@ -1251,7 +1251,7 @@ local function register_biomelike_ores()
|
|||||||
minetest.register_ore({
|
minetest.register_ore({
|
||||||
ore_type = "blob",
|
ore_type = "blob",
|
||||||
ore = "mcl_core:coarse_dirt",
|
ore = "mcl_core:coarse_dirt",
|
||||||
wherein = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
wherein = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
|
||||||
clust_scarcity = 1500,
|
clust_scarcity = 1500,
|
||||||
clust_num_ores = 25,
|
clust_num_ores = 25,
|
||||||
clust_size = 7,
|
clust_size = 7,
|
||||||
@ -1604,11 +1604,15 @@ local function register_grass_decoration(grasstype, offset, scale, biomes)
|
|||||||
local place_on, seed, node
|
local place_on, seed, node
|
||||||
if grasstype == "fern" then
|
if grasstype == "fern" then
|
||||||
node = "mcl_flowers:fern"
|
node = "mcl_flowers:fern"
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}
|
place_on = {"group:grass_block", "mcl_core:podzol"}
|
||||||
seed = 333
|
seed = 333
|
||||||
elseif grasstype == "tallgrass" then
|
elseif grasstype == "tallgrass" then
|
||||||
node = "mcl_flowers:tallgrass"
|
node = "mcl_flowers:tallgrass"
|
||||||
place_on = {"mcl_core:dirt_with_grass"}
|
place_on = {"group:grass_block"}
|
||||||
|
seed = 420
|
||||||
|
elseif grasstype == "tallgrass_dry" then
|
||||||
|
node = "mcl_flowers:tallgrass_dry"
|
||||||
|
place_on = {"group:grass_block"}
|
||||||
seed = 420
|
seed = 420
|
||||||
end
|
end
|
||||||
local noise = {
|
local noise = {
|
||||||
@ -1797,7 +1801,7 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.015,
|
offset = 0.015,
|
||||||
@ -1848,7 +1852,7 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
|
||||||
sidelen = 80,
|
sidelen = 80,
|
||||||
fill_ratio = 0.0004,
|
fill_ratio = 0.0004,
|
||||||
biomes = {"JungleEdge", "JungleEdgeM", "Savanna"},
|
biomes = {"JungleEdge", "JungleEdgeM", "Savanna"},
|
||||||
@ -2091,7 +2095,7 @@ local function register_decorations()
|
|||||||
for a=1, 7 do
|
for a=1, 7 do
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
|
place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
fill_ratio = 0.0002,
|
fill_ratio = 0.0002,
|
||||||
biomes = {"Savanna", "SavannaM"},
|
biomes = {"Savanna", "SavannaM"},
|
||||||
@ -2355,7 +2359,7 @@ local function register_decorations()
|
|||||||
-- Sugar canes
|
-- Sugar canes
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = -0.3,
|
offset = -0.3,
|
||||||
@ -2375,7 +2379,7 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.0,
|
offset = 0.0,
|
||||||
@ -2396,7 +2400,18 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Doubletall grass
|
-- Doubletall grass
|
||||||
local register_doubletall_grass = function(offset, scale, biomes)
|
local register_doubletall_grass = function(offset, scale, biomes, is_dry)
|
||||||
|
|
||||||
|
local bottom, top, tallgrass
|
||||||
|
if is_dry then
|
||||||
|
bottom = "mcl_flowers:double_grass_dry"
|
||||||
|
top = "mcl_flowers:double_grass_dry_top"
|
||||||
|
tallgrass = "mcl_flowers:tallgrass_dry"
|
||||||
|
else
|
||||||
|
bottom = "mcl_flowers:double_grass"
|
||||||
|
top = "mcl_flowers:double_grass_top"
|
||||||
|
tallgrass = "mcl_flowers:tallgrass"
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "schematic",
|
deco_type = "schematic",
|
||||||
@ -2404,14 +2419,14 @@ local function register_decorations()
|
|||||||
size = { x=1, y=3, z=1 },
|
size = { x=1, y=3, z=1 },
|
||||||
data = {
|
data = {
|
||||||
{ name = "air", prob = 0 },
|
{ name = "air", prob = 0 },
|
||||||
{ name = "mcl_flowers:double_grass", param1=255, },
|
{ name = bottom, param1=255, },
|
||||||
{ name = "mcl_flowers:double_grass_top", param1=255, },
|
{ name = top, param1=255, },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
replacements = {
|
replacements = {
|
||||||
["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
|
[tallgrass] = bottom,
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = offset,
|
offset = offset,
|
||||||
@ -2427,9 +2442,9 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
register_doubletall_grass(-0.01, 0.03, {"Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "MesaPlateauF_grasstop" })
|
register_doubletall_grass(-0.01, 0.03, {"Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest"})
|
||||||
register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains"})
|
register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains"})
|
||||||
register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"})
|
register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"}, true)
|
||||||
|
|
||||||
-- Large ferns
|
-- Large ferns
|
||||||
local register_double_fern = function(offset, scale, biomes)
|
local register_double_fern = function(offset, scale, biomes)
|
||||||
@ -2446,7 +2461,7 @@ local function register_decorations()
|
|||||||
replacements = {
|
replacements = {
|
||||||
["mcl_flowers:fern"] = "mcl_flowers:double_fern"
|
["mcl_flowers:fern"] = "mcl_flowers:double_fern"
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"},
|
place_on = {"group:grass_block", "mcl_core:podzol"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = offset,
|
offset = offset,
|
||||||
@ -2493,7 +2508,7 @@ local function register_decorations()
|
|||||||
{ name = "mcl_flowers:"..name.."_top", param1=255, },
|
{ name = "mcl_flowers:"..name.."_top", param1=255, },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"group:grass_block", "mcl_core:dirt"},
|
||||||
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -2858,7 +2873,7 @@ local function register_decorations()
|
|||||||
{ name = "mcl_farming:pumpkin_face", param1=255, },
|
{ name = "mcl_farming:pumpkin_face", param1=255, },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = -0.016,
|
offset = -0.016,
|
||||||
@ -2874,7 +2889,8 @@ local function register_decorations()
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Grasses and ferns
|
-- Grasses and ferns
|
||||||
local grass_forest = {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", "MesaPlateauF_grasstop" }
|
local grass_forest = {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", }
|
||||||
|
local grass_mpf = {"MesaPlateauF_grasstop"}
|
||||||
local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM" }
|
local grass_plains = {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM" }
|
||||||
local grass_savanna = {"Savanna", "SavannaM"}
|
local grass_savanna = {"Savanna", "SavannaM"}
|
||||||
local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle", }
|
local grass_sparse = {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle", }
|
||||||
@ -2884,12 +2900,16 @@ local function register_decorations()
|
|||||||
register_grass_decoration("tallgrass", 0, 0.06, grass_forest)
|
register_grass_decoration("tallgrass", 0, 0.06, grass_forest)
|
||||||
register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest)
|
register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest)
|
||||||
register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest)
|
register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest)
|
||||||
|
register_grass_decoration("tallgrass_dry", -0.03, 0.09, grass_mpf)
|
||||||
|
register_grass_decoration("tallgrass_dry", -0.015, 0.075, grass_mpf)
|
||||||
|
register_grass_decoration("tallgrass_dry", 0, 0.06, grass_mpf)
|
||||||
|
register_grass_decoration("tallgrass_dry", 0.01, 0.045, grass_mpf)
|
||||||
register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest)
|
register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest)
|
||||||
register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains)
|
register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains)
|
||||||
register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains)
|
register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains)
|
||||||
register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains)
|
register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains)
|
||||||
register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains)
|
register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains)
|
||||||
register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna)
|
register_grass_decoration("tallgrass_dry", 0.18, -0.03, grass_savanna)
|
||||||
register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse)
|
register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse)
|
||||||
|
|
||||||
local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga" }
|
local fern_minimal = { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga" }
|
||||||
@ -2960,7 +2980,7 @@ local function register_decorations()
|
|||||||
-- Dead bushes
|
-- Dead bushes
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"group:sand", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:dirt", "mcl_core:coarse_dirt", "group:hardened_clay"},
|
place_on = {"group:sand", "mcl_core:podzol", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt", "group:hardened_clay"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -3030,7 +3050,7 @@ local function register_decorations()
|
|||||||
-- Mushrooms next to trees
|
-- Mushrooms next to trees
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0,
|
offset = 0,
|
||||||
@ -3075,7 +3095,7 @@ local function register_decorations()
|
|||||||
if biomes then
|
if biomes then
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"group:grass_block", "mcl_core:dirt"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.0008,
|
offset = 0.0008,
|
||||||
@ -3094,7 +3114,7 @@ local function register_decorations()
|
|||||||
if is_in_flower_forest then
|
if is_in_flower_forest then
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
|
place_on = {"group:grass_block", "mcl_core:dirt"},
|
||||||
sidelen = 80,
|
sidelen = 80,
|
||||||
noise_params= {
|
noise_params= {
|
||||||
offset = 0.0008*40,
|
offset = 0.0008*40,
|
||||||
|
@ -688,7 +688,7 @@ local function register_mgv6_decorations()
|
|||||||
-- Sugar canes
|
-- Sugar canes
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = -0.3,
|
offset = -0.3,
|
||||||
@ -721,7 +721,7 @@ local function register_mgv6_decorations()
|
|||||||
replacements = {
|
replacements = {
|
||||||
["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
|
["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 8,
|
sidelen = 8,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = -0.0025,
|
offset = -0.0025,
|
||||||
@ -752,7 +752,7 @@ local function register_mgv6_decorations()
|
|||||||
-- v6 hack: This makes sure large ferns only appear in jungles
|
-- v6 hack: This makes sure large ferns only appear in jungles
|
||||||
spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" },
|
spawn_by = { "mcl_core:jungletree", "mcl_flowers:fern" },
|
||||||
num_spawn_by = 1,
|
num_spawn_by = 1,
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -779,7 +779,7 @@ local function register_mgv6_decorations()
|
|||||||
{ name = "mcl_flowers:"..name.."_top", param1=255, },
|
{ name = "mcl_flowers:"..name.."_top", param1=255, },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
|
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
@ -837,7 +837,7 @@ local function register_mgv6_decorations()
|
|||||||
{ name = "mcl_farming:pumpkin_face" },
|
{ name = "mcl_farming:pumpkin_face" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = -0.008,
|
offset = -0.008,
|
||||||
@ -855,7 +855,7 @@ local function register_mgv6_decorations()
|
|||||||
-- Tall grass
|
-- Tall grass
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 8,
|
sidelen = 8,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.01,
|
offset = 0.01,
|
||||||
@ -871,7 +871,7 @@ local function register_mgv6_decorations()
|
|||||||
})
|
})
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 8,
|
sidelen = 8,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.04,
|
offset = 0.04,
|
||||||
@ -888,7 +888,7 @@ local function register_mgv6_decorations()
|
|||||||
-- Add a small amount of tall grass everywhere to avoid areas completely empty devoid of tall grass
|
-- Add a small amount of tall grass everywhere to avoid areas completely empty devoid of tall grass
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 8,
|
sidelen = 8,
|
||||||
fill_ratio = 0.004,
|
fill_ratio = 0.004,
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
@ -902,7 +902,7 @@ local function register_mgv6_decorations()
|
|||||||
-- Mushrooms next to trees
|
-- Mushrooms next to trees
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.04,
|
offset = 0.04,
|
||||||
@ -947,7 +947,7 @@ local function register_mgv6_decorations()
|
|||||||
end
|
end
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
place_on = {"mcl_core:dirt_with_grass"},
|
place_on = {"group:grass_block"},
|
||||||
sidelen = 16,
|
sidelen = 16,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = offset,
|
offset = offset,
|
||||||
@ -1167,7 +1167,7 @@ local function generate_structures(minp, maxp, seed, biomemap)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Igloos
|
-- Igloos
|
||||||
elseif not chunk_has_igloo and (nn == "mcl_core:snowblock" or nn == "mcl_core:snow" or nn == "mcl_core:dirt_with_grass_snow") then
|
elseif not chunk_has_igloo and (nn == "mcl_core:snowblock" or nn == "mcl_core:snow" or (minetest.get_item_group(nn, "grass_block") == 1 and minetest.get_item_group(nn, "snowed") == 1)) then
|
||||||
if math.random(1, 4400) == 1 then
|
if math.random(1, 4400) == 1 then
|
||||||
-- Check surface
|
-- Check surface
|
||||||
local floor = {x=p.x+9, y=p.y-1, z=p.z+9}
|
local floor = {x=p.x+9, y=p.y-1, z=p.z+9}
|
||||||
@ -1778,8 +1778,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
-- Clear snowy grass blocks without snow above to ensure consistency.
|
-- Clear snowy grass blocks without snow above to ensure consistency.
|
||||||
-- Solidify floating sand to sandstone (both colors).
|
-- Solidify floating sand to sandstone (both colors).
|
||||||
else
|
else
|
||||||
--local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow"})
|
local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_dry_grass_snow", "mcl_core:sand", "mcl_core:redsand"})
|
||||||
local nodes = minetest.find_nodes_in_area(minp, maxp, {"mcl_core:dirt_with_grass_snow", "mcl_core:sand", "mcl_core:redsand"})
|
|
||||||
for n=1, #nodes do
|
for n=1, #nodes do
|
||||||
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
|
local p_pos = area:index(nodes[n].x, nodes[n].y, nodes[n].z)
|
||||||
local p_pos_above = area:index(nodes[n].x, nodes[n].y+1, nodes[n].z)
|
local p_pos_above = area:index(nodes[n].x, nodes[n].y+1, nodes[n].z)
|
||||||
|
@ -131,12 +131,6 @@ def convert_textures():
|
|||||||
FOLIAG = tex_dir+"/colormap/foliage.png"
|
FOLIAG = tex_dir+"/colormap/foliage.png"
|
||||||
GRASS = tex_dir+"/colormap/grass.png"
|
GRASS = tex_dir+"/colormap/grass.png"
|
||||||
|
|
||||||
os.system("convert "+GRASS+" -crop 1x1+70+120 -depth 8 -resize "+str(PXSIZE)+"x"+str(PXSIZE)+" "+tempfile1.name)
|
|
||||||
os.system("composite -compose Multiply "+tempfile1.name+" "+tex_dir+"/blocks/grass_top.png "+target_dir("/mods/ITEMS/mcl_core/textures")+"/default_grass.png")
|
|
||||||
|
|
||||||
|
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/grass_side_overlay.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/default_grass_side.png")
|
|
||||||
|
|
||||||
|
|
||||||
# Leaves
|
# Leaves
|
||||||
convert_alphatex(FOLIAG, tex_dir+"/blocks/leaves_oak.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/default_leaves.png")
|
convert_alphatex(FOLIAG, tex_dir+"/blocks/leaves_oak.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/default_leaves.png")
|
||||||
@ -153,12 +147,23 @@ def convert_textures():
|
|||||||
convert_alphatex(FOLIAG, tex_dir+"/blocks/vine.png", "16+32", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/mcl_core_vine.png")
|
convert_alphatex(FOLIAG, tex_dir+"/blocks/vine.png", "16+32", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/mcl_core_vine.png")
|
||||||
|
|
||||||
# Tall grass, fern
|
# Tall grass, fern
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/tallgrass.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_tallgrass.png")
|
offset = [
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/fern.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_fern.png")
|
[ "49+172", "", "grass" ], # Default
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_bottom.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_bottom.png")
|
[ "0+255", "_dry", "dry_grass" ], # Dry grass: Savanna, Mesa Plateau F, Nether, …
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_top.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_top.png")
|
]
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_bottom.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_bottom.png")
|
for o in offset:
|
||||||
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_top.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_top.png")
|
convert_alphatex(GRASS, tex_dir+"/blocks/tallgrass.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_tallgrass"+o[1]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/fern.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_fern"+o[1]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_bottom.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_bottom"+o[1]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_fern_top.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_fern_top"+o[1]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_bottom.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_bottom"+o[1]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/double_plant_grass_top.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_flowers/textures")+"/mcl_flowers_double_plant_grass_top"+o[1]+".png")
|
||||||
|
|
||||||
|
os.system("convert "+GRASS+" -crop 1x1+"+o[0]+" -depth 8 -resize "+str(PXSIZE)+"x"+str(PXSIZE)+" "+tempfile1.name)
|
||||||
|
os.system("composite -compose Multiply "+tempfile1.name+" "+tex_dir+"/blocks/grass_top.png "+target_dir("/mods/ITEMS/mcl_core/textures")+"/default_"+o[2]+".png")
|
||||||
|
convert_alphatex(GRASS, tex_dir+"/blocks/grass_side_overlay.png", o[0], str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/default_"+o[2]+"_side.png")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: Convert banner masks
|
# TODO: Convert banner masks
|
||||||
# if os.path.isdir(tex_dir + "/entity/banner"):
|
# if os.path.isdir(tex_dir + "/entity/banner"):
|
||||||
|