Refactoring.
This commit is contained in:
parent
c415d15a7b
commit
c5e3c08546
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dependsOn": ["package"],
|
"dependsOn": ["package"],
|
||||||
"label": "update test server",
|
"label": "load build to server",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"args": ["-ExecutionPolicy", "Bypass", "-File", "./load_latest_build.ps1"],
|
"args": ["-ExecutionPolicy", "Bypass", "-File", "./load_latest_build.ps1"],
|
||||||
"options": {"cwd": "${workspaceFolder}/test-server/"},
|
"options": {"cwd": "${workspaceFolder}/test-server/"},
|
||||||
@ -34,12 +34,12 @@
|
|||||||
"reveal": "silent",
|
"reveal": "silent",
|
||||||
"focus": false,
|
"focus": false,
|
||||||
"panel": "shared",
|
"panel": "shared",
|
||||||
"showReuseMessage": false,
|
"showReuseMessage": true,
|
||||||
"clear": false
|
"clear": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dependsOn": ["update test server"],
|
"dependsOn": ["load build to server"],
|
||||||
"label": "start test server",
|
"label": "start test server",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"runOptions": {"instanceLimit": 1},
|
"runOptions": {"instanceLimit": 1},
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
|
|
||||||
import ca.recrown.islandsurvivalcraft.world.generation.IslandBiomeGenerator;
|
import ca.recrown.islandsurvivalcraft.world.generation.IslandBiomeGenerator;
|
||||||
|
import ca.recrown.islandsurvivalcraft.world.generation.IslandWorldGenerator;
|
||||||
|
|
||||||
public class IslandSurvivalCraftChunkGenerator extends ChunkGenerator {
|
public class IslandSurvivalCraftChunkGenerator extends ChunkGenerator {
|
||||||
private final IslandWorldGeneratorAlternator alternator;
|
private final IslandWorldGeneratorAlternator alternator;
|
||||||
|
@ -7,6 +7,7 @@ import java.util.UUID;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
import ca.recrown.islandsurvivalcraft.world.generation.IslandBiomeGenerator;
|
import ca.recrown.islandsurvivalcraft.world.generation.IslandBiomeGenerator;
|
||||||
|
import ca.recrown.islandsurvivalcraft.world.generation.IslandWorldGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alternates the data used on a per world basis.
|
* Alternates the data used on a per world basis.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package ca.recrown.islandsurvivalcraft.world;
|
package ca.recrown.islandsurvivalcraft.world.generation;
|
||||||
|
|
||||||
import java.security.InvalidAlgorithmParameterException;
|
import java.security.InvalidAlgorithmParameterException;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -9,8 +9,8 @@ import org.bukkit.block.Biome;
|
|||||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||||
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
||||||
|
|
||||||
import ca.recrown.islandsurvivalcraft.world.generation.BedrockGenerator;
|
import ca.recrown.islandsurvivalcraft.world.BiomeSelector;
|
||||||
import ca.recrown.islandsurvivalcraft.world.generation.IslandBiomeGenerator;
|
import ca.recrown.islandsurvivalcraft.world.IslandWorldMapper;
|
||||||
import ca.recrown.islandsurvivalcraft.world.shaders.WorldHeightShader;
|
import ca.recrown.islandsurvivalcraft.world.shaders.WorldHeightShader;
|
||||||
|
|
||||||
/**
|
/**
|
@ -50,7 +50,7 @@ public class WorldHeightShader {
|
|||||||
height = (int) (getNormalizedHeightModifier(worldX, worldZ) * 5D + baseValue);
|
height = (int) (getNormalizedHeightModifier(worldX, worldZ) * 5D + baseValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (height > worldHeight) throw new InvalidAlgorithmParameterException("Resulting height is greater than world height!!! Biome: " + biomeName);
|
if (height > worldHeight) throw new InvalidAlgorithmParameterException("Resulting height is greater than world height! Biome this occurred on: " + biomeName);
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user