-
Notifications
You must be signed in to change notification settings - Fork 12
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
21 changed files
with
118 additions
and
184 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
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
16 changes: 0 additions & 16 deletions
16
src/main/java/com/github/platymemo/alaskanativecraft/compat/AlaskaModMenu.java
This file was deleted.
Oops, something went wrong.
133 changes: 64 additions & 69 deletions
133
src/main/java/com/github/platymemo/alaskanativecraft/config/AlaskaConfig.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 |
---|---|---|
@@ -1,85 +1,80 @@ | ||
package com.github.platymemo.alaskanativecraft.config; | ||
|
||
import com.github.platymemo.alaskanativecraft.AlaskaNativeCraft; | ||
import me.shedaniel.autoconfig.AutoConfig; | ||
import me.shedaniel.autoconfig.ConfigData; | ||
import me.shedaniel.autoconfig.annotation.Config; | ||
import me.shedaniel.autoconfig.annotation.ConfigEntry; | ||
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; | ||
import org.quiltmc.config.api.ReflectiveConfig; | ||
import org.quiltmc.config.api.annotations.Comment; | ||
import org.quiltmc.config.api.annotations.FloatRange; | ||
import org.quiltmc.config.api.values.TrackedValue; | ||
|
||
@Config(name = AlaskaNativeCraft.MOD_ID) | ||
public class AlaskaConfig implements ConfigData { | ||
@ConfigEntry.Gui.Excluded | ||
private static boolean registered = false; | ||
@ConfigEntry.Gui.TransitiveObject | ||
@ConfigEntry.Category("spawning") | ||
public SpawnOptions spawning = new SpawnOptions(); | ||
@ConfigEntry.Gui.TransitiveObject | ||
@ConfigEntry.Category("generation") | ||
public GenerationOptions generation = new GenerationOptions(); | ||
public class AlaskaConfig extends ReflectiveConfig { | ||
@Comment("Spawning Options") | ||
public final SpawnOptions spawning = new SpawnOptions(); | ||
@Comment("Generation Options") | ||
public final GenerationOptions generation = new GenerationOptions(); | ||
|
||
public boolean snowballConversion = false; | ||
public boolean mooseEatBark = true; | ||
@ConfigEntry.Gui.CollapsibleObject | ||
public SealFishing sealFishing = new SealFishing(); | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean snowOverhaul = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public float snowSlow = 0.1f; | ||
@Comment("Do Snowballs Convert Birds") | ||
public final TrackedValue<Boolean> snowballConversion = this.value(false); | ||
@Comment("Do Moose Strip Logs") | ||
public final TrackedValue<Boolean> mooseEatBark = this.value(true); | ||
@Comment("Seal Fish Hunting Mechanics") | ||
public final SealFishing sealFishing = new SealFishing(); | ||
@Comment("Enables Snow Overhaul") | ||
public final TrackedValue<Boolean> snowOverhaul = this.value(true); | ||
@Comment("How Much Snow Slows Entities") | ||
@FloatRange(min = 0.0f, max = 1.0f) | ||
public final TrackedValue<Float> snowSlow = this.value(0.1f); | ||
|
||
public static synchronized AlaskaConfig getConfig() { | ||
if (!registered) { | ||
AutoConfig.register(AlaskaConfig.class, GsonConfigSerializer::new); | ||
registered = true; | ||
} | ||
|
||
return AutoConfig.getConfigHolder(AlaskaConfig.class).getConfig(); | ||
} | ||
|
||
public static class SealFishing { | ||
public boolean sealsHuntFish = true; | ||
@ConfigEntry.Gui.Tooltip(count = 2) | ||
public boolean sealsEatHuntedFish = true; | ||
@ConfigEntry.Gui.Tooltip(count = 2) | ||
public boolean sealsBreedFromHuntedFish = false; | ||
public static class SealFishing extends Section { | ||
@Comment("Do Seals Hunt Fish") | ||
public final TrackedValue<Boolean> sealsHuntFish = this.value(true); | ||
@Comment("Do Seals Eat Hunted Fish") | ||
@Comment("WARNING:") | ||
@Comment("Disabling this may cause lag from fish drops.") | ||
public final TrackedValue<Boolean> sealsEatHuntedFish = this.value(true); | ||
@Comment("Do Seals Breed From Eating Hunted Fish") | ||
@Comment("WARNING:") | ||
@Comment("Enabling this may cause seal populations to drastically rise.") | ||
public final TrackedValue<Boolean> sealsBreedFromHuntedFish = this.value(false); | ||
@Comment("The chance a seal breeds whenever it hunts fish") | ||
@FloatRange(min = 0.0f, max = 1.0f) | ||
public final TrackedValue<Float> sealsBreedChance = this.value(0.1f); | ||
} | ||
|
||
public static class SpawnOptions { | ||
@ConfigEntry.Gui.CollapsibleObject | ||
public SpawnSettings sealOceanSettings = new SpawnSettings(5, 1, 4); | ||
@ConfigEntry.Gui.CollapsibleObject | ||
public SpawnSettings mooseSettings = new SpawnSettings(2, 1, 3); | ||
@ConfigEntry.Gui.CollapsibleObject | ||
public SpawnSettings ptarmiganSettings = new SpawnSettings(5, 2, 5); | ||
public static class SpawnOptions extends Section { | ||
@Comment("Seal Spawning Options") | ||
public final SpawnSettings sealSettings = new SpawnSettings(5, 1, 4); | ||
@Comment("Moose Spawning Options") | ||
public final SpawnSettings mooseSettings = new SpawnSettings(2, 1, 3); | ||
@Comment("Ptarmigan Spawning Options") | ||
public final SpawnSettings ptarmiganSettings = new SpawnSettings(5, 2, 5); | ||
|
||
public static class SpawnSettings { | ||
@ConfigEntry.Gui.RequiresRestart | ||
public int weight; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public int minGroupSize; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public int maxGroupSize; | ||
public static class SpawnSettings extends Section { | ||
@Comment("How Often the Spawned Mob will be This One") | ||
public final TrackedValue<Integer> weight; | ||
@Comment("The Minimum Number of This Mob to Spawn at Once") | ||
public final TrackedValue<Integer> minGroupSize; | ||
@Comment("The Maximum Number of This Mob to Spawn at Once") | ||
public final TrackedValue<Integer> maxGroupSize; | ||
|
||
public SpawnSettings(int weight, int minGroupSize, int maxGroupSize) { | ||
this.weight = weight; | ||
this.minGroupSize = minGroupSize; | ||
this.maxGroupSize = maxGroupSize; | ||
this.weight = this.value(weight); | ||
this.minGroupSize = this.value(minGroupSize); | ||
this.maxGroupSize = this.value(maxGroupSize); | ||
} | ||
} | ||
} | ||
|
||
public static class GenerationOptions { | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genDriftwood = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genBlueberry = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genCloudberry = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genRaspberry = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genSalmonberry = true; | ||
@ConfigEntry.Gui.RequiresRestart | ||
public boolean genLabradorTea = true; | ||
public static class GenerationOptions extends Section { | ||
@Comment("Generate Driftwood") | ||
public final TrackedValue<Boolean> genDriftwood = this.value(true); | ||
@Comment("Generate Blueberries") | ||
public final TrackedValue<Boolean> genBlueberry = this.value(true); | ||
@Comment("Generate Low-Bush Salmonberries") | ||
public final TrackedValue<Boolean> genCloudberry = this.value(true); | ||
@Comment("Generate Raspberries") | ||
public final TrackedValue<Boolean> genRaspberry = this.value(true); | ||
@Comment("Generate Salmonberries") | ||
public final TrackedValue<Boolean> genSalmonberry = this.value(true); | ||
@Comment("Generate Labrador Tea Flowers") | ||
public final TrackedValue<Boolean> genLabradorTea = this.value(true); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.