mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-16 13:51:41 +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.setFractalType(FastNoiseLite.FractalType.FBm);
|
||||||
this.noise.setFractalOctaves(4);
|
this.noise.setFractalOctaves(4);
|
||||||
ConfigPackTemplate t = wc.getTemplate();
|
ConfigPackTemplate t = wc.getTemplate();
|
||||||
this.noise.setFrequency(1D / t.getZoneFreq());
|
this.noise.setFrequency(1D / (t.getZoneFreq() * grids.length));
|
||||||
this.grids = grids;
|
this.grids = grids;
|
||||||
imageLoader = t.getImageLoader();
|
imageLoader = t.getImageLoader();
|
||||||
useImage = t.isFromImage();
|
useImage = t.isFromImage();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class ConfigPackTemplate implements ValidatedConfigTemplate {
|
|||||||
|
|
||||||
@Value("frequencies.zone")
|
@Value("frequencies.zone")
|
||||||
@Default
|
@Default
|
||||||
private int zoneFreq = 2048;
|
private int zoneFreq = 256;
|
||||||
|
|
||||||
@Value("blend.enable")
|
@Value("blend.enable")
|
||||||
@Default
|
@Default
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ public class BiomeGridFactory implements TerraFactory<BiomeGridTemplate, BiomeGr
|
|||||||
int xSize = config.getGrid().size();
|
int xSize = config.getGrid().size();
|
||||||
int zSize = config.getGrid().get(0).size();
|
int zSize = config.getGrid().get(0).size();
|
||||||
|
|
||||||
holder.setXFreq(config.getXFreq() / xSize);
|
holder.setXFreq(config.getXFreq() * xSize);
|
||||||
holder.setZFreq(config.getZFreq() / zSize);
|
holder.setZFreq(config.getZFreq() * zSize);
|
||||||
|
|
||||||
Biome[][] biomes = new UserDefinedBiome[xSize][zSize];
|
Biome[][] biomes = new UserDefinedBiome[xSize][zSize];
|
||||||
|
|
||||||
|
|||||||
+1
-21
@@ -95,27 +95,7 @@ public class ExportCommand extends PlayerCommand {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
sender.sendMessage("Exported structure to " + file.getAbsolutePath());
|
||||||
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();
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
return true;
|
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.api.world.tree.Tree;
|
||||||
import com.dfsek.terra.bukkit.world.BukkitAdapter;
|
import com.dfsek.terra.bukkit.world.BukkitAdapter;
|
||||||
import com.dfsek.terra.config.base.ConfigPack;
|
import com.dfsek.terra.config.base.ConfigPack;
|
||||||
import com.dfsek.terra.debug.Debug;
|
|
||||||
import com.dfsek.terra.registry.TreeRegistry;
|
import com.dfsek.terra.registry.TreeRegistry;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.TreeType;
|
import org.bukkit.TreeType;
|
||||||
@@ -54,7 +53,6 @@ public class EventListener implements Listener {
|
|||||||
block.setType(Material.AIR);
|
block.setType(Material.AIR);
|
||||||
TreeRegistry registry = c.getTreeRegistry();
|
TreeRegistry registry = c.getTreeRegistry();
|
||||||
Tree tree = registry.get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
|
Tree tree = registry.get(TREE_TYPE_STRING_TRANSFORMER.translate(e.getSpecies()));
|
||||||
Debug.info("Overrode tree type: " + e.getSpecies());
|
|
||||||
org.bukkit.Location location = e.getLocation();
|
org.bukkit.Location location = e.getLocation();
|
||||||
if(!tree.plant(new Location(bukkit, location.getX(), location.getY(), location.getZ()), new FastRandom())) block.setBlockData(data);
|
if(!tree.plant(new Location(bukkit, location.getX(), location.getY(), location.getZ()), new FastRandom())) block.setBlockData(data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user