Skip to content

Commit

Permalink
Added more configurability for biome weights
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugman76 committed Feb 6, 2021
1 parent dd2824b commit c9f356e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"

modApi "com.github.DawnTeamMC:DawnAPI:${dawn_version}"
modApi "com.github.DawnTeamMC:DawnAPI:v${dawn_version}"

compileOnly "com.google.code.findbugs:jsr305:3.0.2"
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ github_name=WildExplorer
curseforge_slug=wild-explorer
curseforge_id=399648
curseforge_game_versions=1.16.2, 1.16.3, 1.16.4, 1.16.5, Fabric
curseforge_embedded_libraries=
curseforge_embedded_libraries=auto-config-updated-api, cloth-config
curseforge_required_dependencies=fabric-api, dawn
curseforge_optional_dependencies=

Expand All @@ -30,11 +30,11 @@ modrinth_mod_loaders=fabric

# check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.3
yarn_mappings=1.16.5+build.4
loader_version=0.11.1
fabric_version=0.30.0+1.16
# https://github.com/DawnTeamMC/DawnAPI
dawn_version=e562776
dawn_version=1.6.5

# Changelog Options
use_project_username=false
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/hugman/wild_explorer/config/WEConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
import me.sargunvohra.mcmods.autoconfig1u.serializer.PartitioningSerializer;
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;

@Config(name = "wild_explorer")
@Config.Gui.Background("minecraft:textures/block/lime_concrete.png")
Expand All @@ -26,13 +27,22 @@ public static class BiomesCategory implements ConfigData {
@ConfigEntry.Gui.RequiresRestart
public boolean pumpkin_pastures = true;
@ConfigEntry.Gui.RequiresRestart
@ConfigEntry.BoundedDiscrete(min = 1, max = 25)
public int pumpkin_pastures_weight = 10;
@ConfigEntry.Gui.RequiresRestart
public boolean cherry_oak_forests = true;
@ConfigEntry.Gui.RequiresRestart
@ConfigEntry.BoundedDiscrete(min = 1, max = 25)
public int cherry_oak_forests_weight = 10;
@ConfigEntry.Gui.RequiresRestart
public boolean tall_nether_forests = true;
@ConfigEntry.Gui.RequiresRestart
public boolean nether_galleries = true;
@ConfigEntry.Gui.RequiresRestart
public boolean dark_amaranth_forests = true;
@ConfigEntry.Gui.RequiresRestart
@ConfigEntry.BoundedDiscrete(min = 1, max = 25)
public int dark_amaranth_forests_weight = 10;
}

@Config(name = "features")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.hugman.wild_explorer.config;

import io.github.prospector.modmenu.api.ConfigScreenFactory;
import io.github.prospector.modmenu.api.ModMenuApi;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/hugman/wild_explorer/init/WEBiomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public static void init() {
}

public static void addToGen() {
if(CONFIG.pumpkin_pastures) OverworldBiomes.addContinentalBiome(PUMPKIN_PASTURES, OverworldClimate.COOL, 1D);
if(CONFIG.pumpkin_pastures) OverworldBiomes.addContinentalBiome(PUMPKIN_PASTURES, OverworldClimate.COOL, CONFIG.pumpkin_pastures_weight / 10.0D);
if(CONFIG.cherry_oak_forests) {
OverworldBiomes.addContinentalBiome(PINK_CHERRY_OAK_FOREST, OverworldClimate.COOL, 1D);
OverworldBiomes.addContinentalBiome(WHITE_CHERRY_OAK_FOREST, OverworldClimate.COOL, 1D);
OverworldBiomes.addContinentalBiome(PINK_CHERRY_OAK_FOREST, OverworldClimate.COOL, CONFIG.cherry_oak_forests_weight / 10.0D);
OverworldBiomes.addContinentalBiome(WHITE_CHERRY_OAK_FOREST, OverworldClimate.COOL, CONFIG.cherry_oak_forests_weight / 10.0D);
}
if(CONFIG.tall_nether_forests) {
NetherBiomes.addNetherBiome(TALL_CRIMSON_FOREST, new Biome.MixedNoisePoint(0.4F, 0.0F, 0.1F, 0.0F, 0.0F));
Expand All @@ -43,8 +43,8 @@ public static void addToGen() {
NetherBiomes.addNetherBiome(PROTANOPIAN_GALLERY, new Biome.MixedNoisePoint(0.025F, 0.1F, 0.0F, 0.0F, 0.05F));
}
if(CONFIG.dark_amaranth_forests) {
TheEndBiomes.addHighlandsBiome(TALL_DARK_AMARANTH_FOREST, 1.0D);
TheEndBiomes.addMidlandsBiome(TALL_DARK_AMARANTH_FOREST, DARK_AMARANTH_FOREST, 1.0D);
TheEndBiomes.addHighlandsBiome(TALL_DARK_AMARANTH_FOREST, CONFIG.dark_amaranth_forests_weight / 10.0D);
TheEndBiomes.addMidlandsBiome(TALL_DARK_AMARANTH_FOREST, DARK_AMARANTH_FOREST, CONFIG.dark_amaranth_forests_weight / 10.0D);
}
}
}
4 changes: 4 additions & 0 deletions src/main/resources/assets/wild_explorer/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"modmenu.descriptionTranslation.wild_explorer": "Fancy and simplistic animals, biomes, structures and more!",

"block.wild_explorer.oak_leaf_pile": "Oak Leaf Pile",
"block.wild_explorer.spruce_leaf_pile": "Spruce Leaf Pile",
"block.wild_explorer.birch_leaf_pile": "Birch Leaf Pile",
Expand Down Expand Up @@ -176,10 +177,13 @@
"text.autoconfig.wild_explorer.category.structures": "Structures",
"text.autoconfig.wild_explorer.category.creatures": "Creatures",
"text.autoconfig.wild_explorer.option.biomes.pumpkin_pastures": "Generate Pumpkin Pastures",
"text.autoconfig.wild_explorer.option.biomes.pumpkin_pastures_weight": "Pumpkin Pastures weight",
"text.autoconfig.wild_explorer.option.biomes.cherry_oak_forests": "Generate Cherry Oak Forests",
"text.autoconfig.wild_explorer.option.biomes.cherry_oak_forests_weight": "Cherry Oak Forests weight",
"text.autoconfig.wild_explorer.option.biomes.tall_nether_forests": "Generate taller Nether forest variants",
"text.autoconfig.wild_explorer.option.biomes.nether_galleries": "Generate Nether galleries",
"text.autoconfig.wild_explorer.option.biomes.dark_amaranth_forests": "Generate Dark Amaranth Forests",
"text.autoconfig.wild_explorer.option.biomes.dark_amaranth_forests_weight": "Dark Amaranth Forests weight",
"text.autoconfig.wild_explorer.option.features.igneous_rock_patches": "Generate patches of new igneous rocks",
"text.autoconfig.wild_explorer.option.features.igneous_rock_patches.@Tooltip": "Blunite and Carbonite patches",
"text.autoconfig.wild_explorer.option.features.palm_trees": "Generate palm trees",
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
"custom": {
"modmenu": {
"links": {
"modmenu.twitter": "https://twitter.com/DawnTeamMC",
"modmenu.discord": "https://discord.gg/8ksTVJu",
"modmenu.dawn.curseforge": "https://www.curseforge.com/minecraft/mc-mods/${curseforge_slug}",
"modmenu.dawn.modrinth": "https://modrinth.com/mod/${modrinth_slug}"
"modmenu.curseforge": "https://www.curseforge.com/minecraft/mc-mods/${curseforge_slug}",
"modmenu.modrinth": "https://modrinth.com/mod/${modrinth_slug}",
"modmenu.github_releases": "https://github.com/DawnTeamMC/${github_name}/releases/",
"modmenu.crowdin": "https://crowdin.com/project/dawnteam",
"modmenu.wiki": "https://github.com/DawnTeamMC/${github_name}/wiki/"
}
},
"modupdater": {
Expand Down

0 comments on commit c9f356e

Please sign in to comment.