1
0
Fork 0

Replace all melon/pumpkin stems in woodland_cabins with unconnected variants.

wood_api
MysticTempest 2022-07-09 19:35:51 -05:00
parent ec6d5628e2
commit 484ad2b630
1 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,11 @@ local rotations = {
"270"
}
local replacement = {
["mcl_farming:pumpkintige_linked_t"] = "mcl_farming:pumpkintige_unconnect",
["mcl_farming:melontige_linked_t"] = "mcl_farming:melontige_unconnect"
}
local function ecb_place(blockpos, action, calls_remaining, param)
if calls_remaining >= 1 then return end
minetest.place_schematic(param.pos, param.schematic, param.rotation, param.replacements, param.force_placement, param.flags)
@ -37,7 +42,7 @@ function mcl_structures.place_schematic(pos, schematic, rotation, replacements,
local p1 = {x=pos.x , y=pos.y , z=pos.z }
local p2 = {x=pos.x+x-1, y=pos.y+s.size.y-1, z=pos.z+z-1}
minetest.log("verbose", "[mcl_structures] size=" ..minetest.pos_to_string(s.size) .. ", rotation=" .. tostring(rotation) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
local param = {pos=vector.new(pos), schematic=s, rotation=rotation, replacements=replacements, force_placement=force_placement, flags=flags, p1=p1, p2=p2, after_placement_callback = after_placement_callback, size=vector.new(s.size), pr=pr, callback_param=callback_param}
local param = {pos=vector.new(pos), schematic=s, rotation=rotation, replacements=replacement, force_placement=force_placement, flags=flags, p1=p1, p2=p2, after_placement_callback = after_placement_callback, size=vector.new(s.size), pr=pr, callback_param=callback_param}
minetest.emerge_area(p1, p2, ecb_place, param)
return true
end