Skip to content

Commit

Permalink
Hide offset for core.generate_biomes and core.generate_biome_dust
Browse files Browse the repository at this point in the history
  • Loading branch information
kromka-chleba committed Jan 28, 2025
1 parent 0071cd1 commit ac7b4b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/script/lua_api/l_mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1649,8 +1649,8 @@ int ModApiMapgen::l_generate_biomes(lua_State *L)
mg.biomemap = bgen->biomemap;
mg.water_level = mg_current->water_level;

v3s16 pmin = lua_istable(L, 2) ? check_v3s16(L, 2) :
mg.vm->m_area.MinEdge + v3s16(1,1,1) * MAP_BLOCKSIZE;
v3s16 pmin = lua_istable(L, 2) ? check_v3s16(L, 2) - v3s16(0,1,0) :
mg.vm->m_area.MinEdge + v3s16(1,1,1) * MAP_BLOCKSIZE - v3s16(0,1,0);
v3s16 pmax = lua_istable(L, 3) ? check_v3s16(L, 3) :
mg.vm->m_area.MaxEdge - v3s16(1,1,1) * MAP_BLOCKSIZE;
sortBoxVerticies(pmin, pmax);
Expand Down Expand Up @@ -1706,8 +1706,8 @@ int ModApiMapgen::l_generate_biome_dust(lua_State *L)

v3s16 pmin = lua_istable(L, 2) ? check_v3s16(L, 2) :
mg.vm->m_area.MinEdge + v3s16(1,1,1) * MAP_BLOCKSIZE;
v3s16 pmax = lua_istable(L, 3) ? check_v3s16(L, 3) :
mg.vm->m_area.MaxEdge - v3s16(1,1,1) * MAP_BLOCKSIZE;
v3s16 pmax = lua_istable(L, 3) ? check_v3s16(L, 3) - v3s16(0,1,0) :
mg.vm->m_area.MaxEdge - v3s16(1,1,1) * MAP_BLOCKSIZE - v3s16(0,1,0);
sortBoxVerticies(pmin, pmax);

mg.node_min = pmin;
Expand Down

0 comments on commit ac7b4b7

Please sign in to comment.