mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
add message to export command, more cleanup
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user