mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2025-01-07 18:58:38 +01:00
Make fields final
This commit is contained in:
parent
2fe7df2824
commit
2c6c59e4aa
@ -49,7 +49,7 @@ public class Boxed extends GameModeAddon {
|
|||||||
// Settings
|
// Settings
|
||||||
private Settings settings;
|
private Settings settings;
|
||||||
private ChunkGenerator chunkGenerator;
|
private ChunkGenerator chunkGenerator;
|
||||||
private Config<Settings> configObject = new Config<>(this, Settings.class);
|
private final Config<Settings> configObject = new Config<>(this, Settings.class);
|
||||||
private AdvancementsManager advManager;
|
private AdvancementsManager advManager;
|
||||||
private DeleteGen delChunks;
|
private DeleteGen delChunks;
|
||||||
private ChunkGenerator netherChunkGenerator;
|
private ChunkGenerator netherChunkGenerator;
|
||||||
@ -103,10 +103,10 @@ public class Boxed extends GameModeAddon {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Check for recommended addons
|
// Check for recommended addons
|
||||||
if (!this.getPlugin().getAddonsManager().getAddonByName("Border").isPresent()) {
|
if (this.getPlugin().getAddonsManager().getAddonByName("Border").isEmpty()) {
|
||||||
this.logWarning("Boxed normally requires the Border addon.");
|
this.logWarning("Boxed normally requires the Border addon.");
|
||||||
}
|
}
|
||||||
if (!this.getPlugin().getAddonsManager().getAddonByName("InvSwitcher").isPresent()) {
|
if (this.getPlugin().getAddonsManager().getAddonByName("InvSwitcher").isEmpty()) {
|
||||||
this.logWarning("Boxed normally requires the InvSwitcher addon for per-world Advancements.");
|
this.logWarning("Boxed normally requires the InvSwitcher addon for per-world Advancements.");
|
||||||
}
|
}
|
||||||
// Advancements manager
|
// Advancements manager
|
||||||
|
@ -15,7 +15,7 @@ public class BoxedChunkGenerator {
|
|||||||
|
|
||||||
private final WorldRef wordRef;
|
private final WorldRef wordRef;
|
||||||
private final Boxed addon;
|
private final Boxed addon;
|
||||||
private WorldRef wordRefNether;
|
private final WorldRef wordRefNether;
|
||||||
|
|
||||||
public BoxedChunkGenerator(Boxed addon) {
|
public BoxedChunkGenerator(Boxed addon) {
|
||||||
this.addon = addon;
|
this.addon = addon;
|
||||||
|
@ -27,7 +27,6 @@ public class NetherGenerator implements BaseNoiseGenerator {
|
|||||||
private final BiomeNoise defaultNoise = new BiomeNoise(10D, 0D, 2D);
|
private final BiomeNoise defaultNoise = new BiomeNoise(10D, 0D, 2D);
|
||||||
private final NoiseGenerator mainNoiseGenerator;
|
private final NoiseGenerator mainNoiseGenerator;
|
||||||
private final Boxed addon;
|
private final Boxed addon;
|
||||||
private final YamlConfiguration config;
|
|
||||||
private final Map<Biome, BiomeNoise> biomeNoiseMap;
|
private final Map<Biome, BiomeNoise> biomeNoiseMap;
|
||||||
|
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ public class NetherGenerator implements BaseNoiseGenerator {
|
|||||||
if (!biomeFile.exists()) {
|
if (!biomeFile.exists()) {
|
||||||
addon.saveResource("biomes.yml", true);
|
addon.saveResource("biomes.yml", true);
|
||||||
}
|
}
|
||||||
config = YamlConfiguration.loadConfiguration(biomeFile);
|
YamlConfiguration config = YamlConfiguration.loadConfiguration(biomeFile);
|
||||||
biomeNoiseMap = new EnumMap<>(Biome.class);
|
biomeNoiseMap = new EnumMap<>(Biome.class);
|
||||||
if (config.isConfigurationSection(NETHER_BIOMES)) {
|
if (config.isConfigurationSection(NETHER_BIOMES)) {
|
||||||
for (String key : config.getConfigurationSection(NETHER_BIOMES).getKeys(false)) {
|
for (String key : config.getConfigurationSection(NETHER_BIOMES).getKeys(false)) {
|
||||||
@ -53,14 +52,14 @@ public class NetherGenerator implements BaseNoiseGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BiomeNoise {
|
static class BiomeNoise {
|
||||||
double noiseScaleHorizontal = 10D;
|
double noiseScaleHorizontal = 10D;
|
||||||
double height = 0D;
|
double height = 0D;
|
||||||
double noiseScaleVertical = 2D;
|
double noiseScaleVertical = 2D;
|
||||||
/**
|
/**
|
||||||
* @param noiseScaleHorizontal
|
* @param noiseScaleHorizontal horizontal noise scale
|
||||||
* @param height
|
* @param height height
|
||||||
* @param noiseScaleVertical
|
* @param noiseScaleVertical vertical noise scale
|
||||||
*/
|
*/
|
||||||
public BiomeNoise(double noiseScaleHorizontal, double height, double noiseScaleVertical) {
|
public BiomeNoise(double noiseScaleHorizontal, double height, double noiseScaleVertical) {
|
||||||
this.noiseScaleHorizontal = noiseScaleHorizontal;
|
this.noiseScaleHorizontal = noiseScaleHorizontal;
|
||||||
|
Loading…
Reference in New Issue
Block a user