Skip to content

Instantly share code, notes, and snippets.

@BalintCsala
Last active July 26, 2020 15:09
Show Gist options
  • Save BalintCsala/f62a9bbd43a8d01aee56768a48b8cc52 to your computer and use it in GitHub Desktop.
Save BalintCsala/f62a9bbd43a8d01aee56768a48b8cc52 to your computer and use it in GitHub Desktop.
void StructureFeature::addFeature(Dimension &dimension, Random &random, ChunkPos &chunkPos, BiomeSource &biomeSource) {
code *pcVar1;
bool uVar5;
undefined8 extraout_RDX;
unique_ptr<StructureStart> structureStart;
nextInt();
std::shared_lock lock1;
// lock1 dies
if (this->structure_start_locations.count() == 0) {
Level level = dimension.getLevel();
uint seed = level.getSeed();
if (this->isFeatureChunk(biomeSource, random, chunkPos, (ulong)seed)) {
std::unique_lock lock2;
if (this->structure_start_locations.count() == 0) {
structureStart->createStructureStart(this, dimension, biomeSource, random, chunkPos);
level = this->structure_start_locations[chunkPos];
level = structureStart; // Possibly level.structureStart = structureStart or smthg
// structureStart dies
}
// lock2 dies
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment