-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/com/kyanite/deeperdarker/util/DeeperDarkerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.kyanite.deeperdarker.util; | ||
|
||
import com.kyanite.deeperdarker.DeeperDarker; | ||
import net.minecraftforge.common.ForgeConfigSpec; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.event.config.ModConfigEvent; | ||
|
||
@Mod.EventBusSubscriber(modid = DeeperDarker.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) | ||
public class DeeperDarkerConfig { | ||
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder(); | ||
|
||
private static final ForgeConfigSpec.BooleanValue WARDEN_HEART_PULSES = BUILDER.comment("Heart of the Deep beats like a heart", "Default: true").define("wardenHeartPulses", true); | ||
private static final ForgeConfigSpec.DoubleValue FAKE_VASE_CHANCE = BUILDER.comment("Chance of a vase being fake", "Default: 0.16").defineInRange("fakeVaseChance", 0.16, 0, 1); | ||
private static final ForgeConfigSpec.DoubleValue STALKER_SPAWN_CHANCE = BUILDER.comment("Chance of a Stalker spawning when a fake vase is broken", "Default: 0.3125").defineInRange("stalkerSpawnChance", 0.3125, 0, 1); | ||
|
||
public static final ForgeConfigSpec SPEC = BUILDER.build(); | ||
public static boolean wardenHeartPulses; | ||
public static double fakeVaseChance; | ||
public static double stalkerSpawnChance; | ||
|
||
@SubscribeEvent | ||
public static void onLoad(final ModConfigEvent event) { | ||
wardenHeartPulses = WARDEN_HEART_PULSES.get(); | ||
fakeVaseChance = FAKE_VASE_CHANCE.get(); | ||
stalkerSpawnChance = STALKER_SPAWN_CHANCE.get(); | ||
} | ||
} |