Backport seasonal config.
This commit is contained in:
parent
7557d8129a
commit
1ac17e5d56
|
@ -11,7 +11,7 @@ public class AetherConfig {
|
||||||
|
|
||||||
private static int max_life_shards;
|
private static int max_life_shards;
|
||||||
|
|
||||||
private static boolean christmas_content, tallgrass;
|
private static boolean christmas_content, tallgrass, seasonal_christmas;
|
||||||
|
|
||||||
private static int aether_biome_id, aether_dimension_id;
|
private static int aether_biome_id, aether_dimension_id;
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ public class AetherConfig {
|
||||||
config.load();
|
config.load();
|
||||||
|
|
||||||
christmas_content = config.get("Aether World Generation", "Christmas Content", false).getBoolean(false);
|
christmas_content = config.get("Aether World Generation", "Christmas Content", false).getBoolean(false);
|
||||||
|
seasonal_christmas = config.get("Aether World Generation", "Spawns Holiday Trees during December and January automatically. Christmas Content overrides this.", true).getBoolean(true);
|
||||||
tallgrass = config.get("Aether World Generation", "Enable Tall Grass", false).getBoolean(false);
|
tallgrass = config.get("Aether World Generation", "Enable Tall Grass", false).getBoolean(false);
|
||||||
|
|
||||||
aether_dimension_id = config.get("World Identification", "Aether Dimension ID", 4).getInt(4);
|
aether_dimension_id = config.get("World Identification", "Aether Dimension ID", 4).getInt(4);
|
||||||
|
@ -177,4 +178,8 @@ public class AetherConfig {
|
||||||
{
|
{
|
||||||
return disable_eternal_day;
|
return disable_eternal_day;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean allowSeasonalChristmas() {
|
||||||
|
return seasonal_christmas;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.gildedgames.the_aether.world.biome;
|
package com.gildedgames.the_aether.world.biome;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.gildedgames.the_aether.AetherConfig;
|
import com.gildedgames.the_aether.AetherConfig;
|
||||||
|
@ -97,8 +98,8 @@ public class AetherBiomeDecorator extends BiomeDecorator {
|
||||||
|
|
||||||
this.getTree().generate(this.world, this.rand, x, y, z);
|
this.getTree().generate(this.world, this.rand, x, y, z);
|
||||||
}
|
}
|
||||||
|
if ((AetherConfig.shouldLoadHolidayContent()) || (AetherConfig.allowSeasonalChristmas() &&
|
||||||
if (AetherConfig.shouldLoadHolidayContent()) {
|
(Calendar.getInstance().get(Calendar.MONTH) + 1 == 12 || Calendar.getInstance().get(Calendar.MONTH) + 1 == 1))) {
|
||||||
if (this.shouldSpawn(15)) {
|
if (this.shouldSpawn(15)) {
|
||||||
int x = this.chunk_X + 8;
|
int x = this.chunk_X + 8;
|
||||||
int z = this.chunk_Z + 8;
|
int z = this.chunk_Z + 8;
|
||||||
|
|
Loading…
Reference in a new issue