add message to export command, more cleanup

This commit is contained in:
dfsek
2021-01-07 09:45:40 -07:00
parent c6ff808cce
commit e47b3f0397
5 changed files with 5 additions and 27 deletions

View File

@@ -27,7 +27,7 @@ public class BiomeZone {
this.noise.setFractalType(FastNoiseLite.FractalType.FBm);
this.noise.setFractalOctaves(4);
ConfigPackTemplate t = wc.getTemplate();
this.noise.setFrequency(1D / t.getZoneFreq());
this.noise.setFrequency(1D / (t.getZoneFreq() * grids.length));
this.grids = grids;
imageLoader = t.getImageLoader();
useImage = t.isFromImage();

View File

@@ -31,7 +31,7 @@ public class ConfigPackTemplate implements ValidatedConfigTemplate {
@Value("frequencies.zone")
@Default
private int zoneFreq = 2048;
private int zoneFreq = 256;
@Value("blend.enable")
@Default

View File

@@ -20,8 +20,8 @@ public class BiomeGridFactory implements TerraFactory<BiomeGridTemplate, BiomeGr
int xSize = config.getGrid().size();
int zSize = config.getGrid().get(0).size();
holder.setXFreq(config.getXFreq() / xSize);
holder.setZFreq(config.getZFreq() / zSize);
holder.setXFreq(config.getXFreq() * xSize);
holder.setZFreq(config.getZFreq() * zSize);
Biome[][] biomes = new UserDefinedBiome[xSize][zSize];

View File

@@ -95,27 +95,7 @@ public class ExportCommand extends PlayerCommand {
/*
Structure structure;
try {
structure = new Structure(l1, l2, args[0]);
} catch(InitializationException e) {
sender.sendMessage(e.getMessage());
return true;
}
try {
File file = new File(getMain().getDataFolder() + File.separator + "export" + File.separator + "structures", args[0] + ".tstructure");
//noinspection ResultOfMethodCallIgnored
file.getParentFile().mkdirs();
//noinspection ResultOfMethodCallIgnored
file.createNewFile();
structure.save(file);
LangUtil.send("command.structure.export", sender, file.getAbsolutePath());
} catch(IOException e) {
e.printStackTrace();
}
*/
sender.sendMessage("Exported structure to " + file.getAbsolutePath());
return true;
}

View File

@@ -10,7 +10,6 @@ import com.dfsek.terra.api.util.FastRandom;
import com.dfsek.terra.api.world.tree.Tree;
import com.dfsek.terra.bukkit.world.BukkitAdapter;
import com.dfsek.terra.config.base.ConfigPack;
import com.dfsek.terra.debug.Debug;
import com.dfsek.terra.registry.TreeRegistry;
import org.bukkit.Material;
import org.bukkit.TreeType;
@@ -54,7 +53,6 @@ public class EventListener implements Listener {
block.setType(Material.AIR);
TreeRegistry registry = c.getTreeRegistry();
Tree tree = registry.get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
Debug.info("Overrode tree type: " + e.getSpecies());
org.bukkit.Location location = e.getLocation();
if(!tree.plant(new Location(bukkit, location.getX(), location.getY(), location.getZ()), new FastRandom())) block.setBlockData(data);
}