mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2025-01-05 18:37:48 +01:00
Make fields final
This commit is contained in:
parent
2fe7df2824
commit
2c6c59e4aa
@ -49,7 +49,7 @@ public class Boxed extends GameModeAddon {
|
||||
// Settings
|
||||
private Settings settings;
|
||||
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 DeleteGen delChunks;
|
||||
private ChunkGenerator netherChunkGenerator;
|
||||
@ -103,10 +103,10 @@ public class Boxed extends GameModeAddon {
|
||||
return;
|
||||
}
|
||||
// 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.");
|
||||
}
|
||||
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.");
|
||||
}
|
||||
// Advancements manager
|
||||
|
@ -15,7 +15,7 @@ public class BoxedChunkGenerator {
|
||||
|
||||
private final WorldRef wordRef;
|
||||
private final Boxed addon;
|
||||
private WorldRef wordRefNether;
|
||||
private final WorldRef wordRefNether;
|
||||
|
||||
public BoxedChunkGenerator(Boxed addon) {
|
||||
this.addon = addon;
|
||||
|
@ -27,7 +27,6 @@ public class NetherGenerator implements BaseNoiseGenerator {
|
||||
private final BiomeNoise defaultNoise = new BiomeNoise(10D, 0D, 2D);
|
||||
private final NoiseGenerator mainNoiseGenerator;
|
||||
private final Boxed addon;
|
||||
private final YamlConfiguration config;
|
||||
private final Map<Biome, BiomeNoise> biomeNoiseMap;
|
||||
|
||||
|
||||
@ -40,7 +39,7 @@ public class NetherGenerator implements BaseNoiseGenerator {
|
||||
if (!biomeFile.exists()) {
|
||||
addon.saveResource("biomes.yml", true);
|
||||
}
|
||||
config = YamlConfiguration.loadConfiguration(biomeFile);
|
||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(biomeFile);
|
||||
biomeNoiseMap = new EnumMap<>(Biome.class);
|
||||
if (config.isConfigurationSection(NETHER_BIOMES)) {
|
||||
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 height = 0D;
|
||||
double noiseScaleVertical = 2D;
|
||||
/**
|
||||
* @param noiseScaleHorizontal
|
||||
* @param height
|
||||
* @param noiseScaleVertical
|
||||
* @param noiseScaleHorizontal horizontal noise scale
|
||||
* @param height height
|
||||
* @param noiseScaleVertical vertical noise scale
|
||||
*/
|
||||
public BiomeNoise(double noiseScaleHorizontal, double height, double noiseScaleVertical) {
|
||||
this.noiseScaleHorizontal = noiseScaleHorizontal;
|
||||
|
Loading…
Reference in New Issue
Block a user