use of gregtech.api.worldgen.populator.VeinChunkPopulator in project GregTech by GregTechCE.
the class CachedGridEntry method populateChunk.
public boolean populateChunk(World world, int chunkX, int chunkZ, Random random) {
long chunkId = (long) chunkX << 32 | chunkZ & 0xFFFFFFFFL;
ChunkDataEntry chunkDataEntry = dataByChunkPos.get(chunkId);
GTWorldGenCapability capability = retrieveCapability(world, chunkX, chunkZ);
capability.setFrom(masterEntry);
if (chunkDataEntry != null && chunkDataEntry.populateChunk(world)) {
for (OreDepositDefinition definition : chunkDataEntry.generatedOres) {
IVeinPopulator veinPopulator = definition.getVeinPopulator();
if (veinPopulator instanceof VeinChunkPopulator) {
((VeinChunkPopulator) veinPopulator).populateChunk(world, chunkX, chunkZ, random, definition, this);
}
}
return true;
}
return false;
}
Aggregations