do the populator shuffle B)

This commit is contained in:
dfsek 2020-11-23 21:57:09 -07:00
parent e270969fd1
commit 8b0a7d422a
3 changed files with 8 additions and 7 deletions

View File

@ -57,7 +57,9 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
public TerraChunkGenerator(ConfigPack c) {
super(ChunkInterpolator.InterpolationType.TRILINEAR);
this.configPack = c;
popMan.attach(new OrePopulator());
popMan.attach(new TreePopulator());
popMan.attach(new FloraPopulator());
popMan.attach(new SnowPopulator());
}
@ -226,7 +228,7 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
@Override
public @NotNull List<BlockPopulator> getDefaultPopulators(@NotNull World world) {
return Arrays.asList(new CavePopulator(), new StructurePopulator(), new OrePopulator(), new FloraPopulator(), popMan);
return Arrays.asList(new CavePopulator(), new StructurePopulator(), popMan);
}
@Override

View File

@ -9,20 +9,20 @@ import com.dfsek.terra.event.OreVeinGenerateEvent;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull;
import org.polydev.gaea.biome.Biome;
import org.polydev.gaea.generation.GenerationPhase;
import org.polydev.gaea.math.MathUtil;
import org.polydev.gaea.math.Range;
import org.polydev.gaea.population.GaeaBlockPopulator;
import org.polydev.gaea.profiler.ProfileFuture;
import org.polydev.gaea.util.FastRandom;
import java.util.Map;
import java.util.Random;
public class OrePopulator extends BlockPopulator {
public class OrePopulator extends GaeaBlockPopulator {
@SuppressWarnings("try")
@Override
public void populate(@NotNull World world, @NotNull Random random, @NotNull Chunk chunk) {

View File

@ -70,13 +70,12 @@ public class SnowPopulator extends GaeaBlockPopulator {
continue;
if(blacklistSpawn.contains(b.getType()) || b.isPassable()) continue;
boolean phys = biome.getSnow().doPhysics();
b.getRelative(BlockFace.UP).setBlockData(DataUtil.SNOW, phys);
if(!phys) {
BlockData data = b.getBlockData();
if(data instanceof Snowable) {
((Snowable) data).setSnowy(true);
}
if(data instanceof Snowable) phys = true;
}
b.getRelative(BlockFace.UP).setBlockData(DataUtil.SNOW, phys);
}
}
}