diff options
author | Damián Imrich <damian@haze.sk> | 2021-04-08 12:24:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 12:24:59 +0200 |
commit | befe132861b1995dfe776d4e134a90fc243d1a17 (patch) | |
tree | ee11f50ccb917718a4da7282a8e5243193571847 /src/Generating/PrefabPiecePool.cpp | |
parent | Obsidian pillars, end fountain, not Ender dragon spawning (#4993) (diff) | |
download | cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.gz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.bz2 cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.lz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.xz cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.tar.zst cuberite-befe132861b1995dfe776d4e134a90fc243d1a17.zip |
Diffstat (limited to 'src/Generating/PrefabPiecePool.cpp')
-rw-r--r-- | src/Generating/PrefabPiecePool.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Generating/PrefabPiecePool.cpp b/src/Generating/PrefabPiecePool.cpp index 88e670026..67d464d13 100644 --- a/src/Generating/PrefabPiecePool.cpp +++ b/src/Generating/PrefabPiecePool.cpp @@ -615,6 +615,12 @@ bool cPrefabPiecePool::ReadPieceMetadataCubesetVer1( } a_Prefab->SetVerticalStrategyFromString(VerticalStrategy, a_LogWarnings); + AString ModifiersStr; + if (a_LuaState.GetNamedValue("Modifiers", ModifiersStr)) + { + a_Prefab->SetPieceModifiersFromString(ModifiersStr, a_LogWarnings); + } + return true; } @@ -744,6 +750,14 @@ void cPrefabPiecePool::AssignGens(int a_Seed, cBiomeGen & a_BiomeGen, cTerrainHe { verticalLimit->AssignGens(a_Seed, a_BiomeGen, a_HeightGen, a_SeaLevel); } + auto modifiers = piece->GetModifiers(); + if (modifiers.size() > 0) + { + for (size_t i = 0; i < modifiers.size(); i++) + { + modifiers[i]->AssignSeed(a_Seed); + } + } } // for piece - m_AllPieces[] } |