image to biome stuff

This commit is contained in:
dfsek
2021-01-18 23:56:46 -07:00
parent 4b21fcd80a
commit 9e830abb90
16 changed files with 392 additions and 100 deletions

View File

@@ -32,15 +32,13 @@ public class BiomeInfoCommand extends WorldCommand {
ConfigPack cfg = getMain().getWorld(BukkitAdapter.adapt(world)).getConfig();
UserDefinedBiome b;
try {
b = cfg.getBiome(id);
b = (UserDefinedBiome) cfg.getBiome(id);
} catch(IllegalArgumentException | NullPointerException e) {
LangUtil.send("command.biome.invalid", new BukkitCommandSender(sender), id);
return true;
}
sender.sendMessage("TerraBiome info for \"" + b.getID() + "\".");
sender.sendMessage("Vanilla biome: " + b.getVanillaBiomes());
sender.sendMessage("Eroded by: " + b.getErode().getConfig().getID());
BiomeTemplate bio = b.getConfig();

View File

@@ -2,8 +2,8 @@ package com.dfsek.terra.bukkit.command.command.biome;
import com.dfsek.terra.TerraWorld;
import com.dfsek.terra.api.math.vector.Vector3;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.async.AsyncBiomeFinder;
import com.dfsek.terra.biome.UserDefinedBiome;
import com.dfsek.terra.bukkit.TerraBukkitPlugin;
import com.dfsek.terra.bukkit.command.WorldCommand;
import com.dfsek.terra.bukkit.world.BukkitAdapter;
@@ -41,7 +41,7 @@ public class BiomeLocateCommand extends WorldCommand {
LangUtil.send("command.biome.invalid-radius", BukkitAdapter.adapt(sender), args[1]);
return true;
}
UserDefinedBiome b;
TerraBiome b;
try {
b = getMain().getWorld(BukkitAdapter.adapt(world)).getConfig().getBiome(id);
} catch(IllegalArgumentException | NullPointerException e) {

View File

@@ -10,6 +10,7 @@ import com.dfsek.terra.bukkit.world.BukkitAdapter;
import com.dfsek.terra.bukkit.world.BukkitBiomeGrid;
import com.dfsek.terra.config.lang.LangUtil;
import com.dfsek.terra.debug.Debug;
import com.dfsek.terra.population.CavePopulator;
import com.dfsek.terra.population.FloraPopulator;
import com.dfsek.terra.population.OrePopulator;
import com.dfsek.terra.population.StructurePopulator;
@@ -89,7 +90,7 @@ public class BukkitChunkGeneratorWrapper extends ChunkGenerator implements Gener
@Override
public @NotNull List<BlockPopulator> getDefaultPopulators(@NotNull World world) {
return Stream.of(new StructurePopulator(main), popMan).map(BukkitPopulatorWrapper::new).collect(Collectors.toList());
return Stream.of(new CavePopulator(main), new StructurePopulator(main), popMan).map(BukkitPopulatorWrapper::new).collect(Collectors.toList());
}
@Override