Skip to content

Commit

Permalink
1.16.5_2.6.1
Browse files Browse the repository at this point in the history
- Added Support for Enhanced Farming
- Cleaned Up Code
- Bumped Version
  • Loading branch information
wolfkidsounds committed Jan 25, 2023
1 parent 9c1ac51 commit 0ba1123
Show file tree
Hide file tree
Showing 57 changed files with 3,133 additions and 1,527 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle'

group = 'wks.wolfkidsounds'
version = '1.16.5_2.5.2_forge'
version = '1.16.5_2.6.1_forge'

java {
archivesBaseName = 'wildplants'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.apache.logging.log4j.Logger;
import wks.wolfkidsounds.wildplants.block.ModBlocks;
import wks.wolfkidsounds.wildplants.config.WildplantsConfig;
import wks.wolfkidsounds.wildplants.config.features.enhancedfarming.EnhancedFarmingConfig;
import wks.wolfkidsounds.wildplants.config.features.harvestcraft.HarvestcraftConfig;
import wks.wolfkidsounds.wildplants.config.features.immersiveengineering.ImmersiveEngineeringConfig;
import wks.wolfkidsounds.wildplants.config.features.minecraft.MinecraftConfig;
Expand All @@ -23,8 +24,6 @@
import wks.wolfkidsounds.wildplants.render.ModRenderers;
import wks.wolfkidsounds.wildplants.utils.FileUtils;

import java.util.Date;

// The value here should match an entry in the META-INF/mods.toml file
@Mod("wildplants")
public class Wildplants {
Expand All @@ -48,6 +47,7 @@ public Wildplants() {
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, HarvestcraftConfig.SPEC, "wildplants/features/harvestcraft2-common.toml");
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, VeggiewayConfig.SPEC, "wildplants/features/veggieway-common.toml");
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, SimpleFarmingConfig.SPEC, "wildplants/features/simplefarming-common.toml");
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, EnhancedFarmingConfig.SPEC, "wildplants/features/enhancedfarming-common.toml");

ModBlocks.register(eventBus);
ModItems.register(eventBus);
Expand Down
212 changes: 69 additions & 143 deletions src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ public class CompatConfig {
public static ForgeConfigSpec.BooleanValue ENABLE_HARVESTCRAFT;
public static ForgeConfigSpec.BooleanValue ENABLE_VEGGIEWAY;
public static ForgeConfigSpec.BooleanValue ENABLE_SIMPLEFARMING;
public static ForgeConfigSpec.BooleanValue ENABLE_ENHANCEDFARMING;

public static Boolean LOADED_IMMERSIVEENGINEERING = ModList.get().isLoaded("immersiveengineering");
public static Boolean LOADED_HARVESTCRAFT = ModList.get().isLoaded("pamhc2crops");
public static Boolean LOADED_VEGGIEWAY = ModList.get().isLoaded("veggie_way");
public static Boolean LOADED_SIMPLEFARMING = ModList.get().isLoaded("simplefarming");
public static Boolean LOADED_ENHANCEDFARMING = ModList.get().isLoaded("enhancedfarming");

public static void initMinecraft(ForgeConfigSpec.Builder BUILDER) {
Wildplants.LOGGER.debug("init-compat-minecraft-configuration");
Expand Down Expand Up @@ -47,4 +49,10 @@ public static void initSimpleFarming(ForgeConfigSpec.Builder BUILDER) {
ENABLE_SIMPLEFARMING = BUILDER
.define("Simple_Farming", true);
}

public static void initEnhancedFarming(ForgeConfigSpec.Builder BUILDER) {
Wildplants.LOGGER.debug("init-compat-enhancedfarming-configuration");
ENABLE_ENHANCEDFARMING = BUILDER
.define("Enhanced_Farming", true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public final class WildplantsConfig {
CompatConfig.initHarvestcraft(BUILDER);
CompatConfig.initVeggieway(BUILDER);
CompatConfig.initSimpleFarming(BUILDER);
CompatConfig.initEnhancedFarming(BUILDER);
BUILDER.pop();
BUILDER.pop();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
package wks.wolfkidsounds.wildplants.config.features.enhancedfarming;

import net.minecraftforge.common.ForgeConfigSpec;
import wks.wolfkidsounds.wildplants.Wildplants;

public class EnhancedFarmingConfig {
public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
public static final ForgeConfigSpec SPEC;

//MINECRAFT
public static ForgeConfigSpec.ConfigValue<String> MINT_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> MINT_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> MINT_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue MINT_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> TOMATO_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> TOMATO_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> TOMATO_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue TOMATO_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> CUCUMBER_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> CUCUMBER_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> CUCUMBER_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue CUCUMBER_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> AUBERGINE_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> AUBERGINE_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> AUBERGINE_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue AUBERGINE_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> GRAPE_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> GRAPE_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> GRAPE_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue GRAPE_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> PINEPAPPLE_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> PINEPAPPLE_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> PINEPAPPLE_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue PINEPAPPLE_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> CORN_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> CORN_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> CORN_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue CORN_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> ONION_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> ONION_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> ONION_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue ONION_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> GARLIC_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> GARLIC_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> GARLIC_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue GARLIC_ENABLED_ENHANCEDFARMING;

public static ForgeConfigSpec.ConfigValue<String> LETTUCE_BIOME_TYPE_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> LETTUCE_FREQUENCY_ENHANCEDFARMING;
public static ForgeConfigSpec.ConfigValue<Integer> LETTUCE_PATCH_SIZE_ENHANCEDFARMING;
public static ForgeConfigSpec.BooleanValue LETTUCE_ENABLED_ENHANCEDFARMING;

static {
Wildplants.LOGGER.debug("init-minecraft-feature-config");
BUILDER.comment(
"Valid Biome Types:\n" +
"Temperature: [HOT, COLD] \n" +
"Vegetation: [SPARSE, DENSE] \n" +
"Humidity: [WET, DRY] \n" +
"Tree Types: [SAVANNA, CONIFEROUS, JUNGLE] \n" +
"Attributes: [SPOOKY, DEAD, LUSH, MUSHROOM, MAGICAL, RARE, PLATEAU, MODIFIED, OCEAN, RIVER, WATER] \n" +
"Generic Types: [MESA, FOREST, PLAINS, MOUNTAIN, HILLS, SWAMP, SANDY, SNOWY, WASTELAND, BEACH, VOID] \n" +
"Use: [OVERWORLD] to generate in all biomes");


BUILDER.push("MINECRAFT_WILD MINT");
MINT_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
MINT_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
MINT_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
MINT_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD TOMATO");
TOMATO_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
TOMATO_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
TOMATO_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
TOMATO_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD CUCUMBER");
CUCUMBER_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
CUCUMBER_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
CUCUMBER_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
CUCUMBER_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD AUBERGINE");
AUBERGINE_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
AUBERGINE_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
AUBERGINE_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
AUBERGINE_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD GRAPE");
GRAPE_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
GRAPE_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
GRAPE_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
GRAPE_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD PINEPAPPLE");
PINEPAPPLE_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
PINEPAPPLE_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
PINEPAPPLE_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
PINEPAPPLE_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD CORN");
CORN_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
CORN_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
CORN_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
CORN_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD ONION");
ONION_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
ONION_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [SAVANNA]")
.define("Biome Type:", "SAVANNA");
ONION_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
ONION_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD GARLIC");
GARLIC_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
GARLIC_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
GARLIC_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency: ", 1);
GARLIC_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size: ", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD LETTUCE");
LETTUCE_ENABLED_ENHANCEDFARMING = BUILDER
.define("Enabled:", true);
LETTUCE_BIOME_TYPE_ENHANCEDFARMING = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
LETTUCE_FREQUENCY_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
LETTUCE_PATCH_SIZE_ENHANCEDFARMING = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();


SPEC = BUILDER.build();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ public class HarvestcraftConfig {
BUILDER.pop();

BUILDER.push("WILD JUTE");
JUTE_ENABLED_HARVESTCRAFT = BUILDER
JUTE_ENABLED_HARVESTCRAFT = BUILDER
.define("Enabled:", true);
JUTE_BIOME_TYPE_HARVESTCRAFT = BUILDER
.comment("Default: [FOREST]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,47 +54,47 @@ public class MinecraftConfig {
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD CARROTS");
CARROTS_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
CARROTS_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
CARROTS_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency: ", 1);
CARROTS_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size: ", 1);
BUILDER.pop();
BUILDER.push("MINECRAFT_WILD CARROTS");
CARROTS_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
CARROTS_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
CARROTS_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency: ", 1);
CARROTS_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size: ", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD POTATOES");
POTATOES_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
POTATOES_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
POTATOES_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
POTATOES_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();
BUILDER.push("MINECRAFT_WILD POTATOES");
POTATOES_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
POTATOES_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
POTATOES_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
POTATOES_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

BUILDER.push("MINECRAFT_WILD BEETROOTS");
BEETROOTS_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
BEETROOTS_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
BEETROOTS_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
BEETROOTS_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();
BUILDER.push("MINECRAFT_WILD BEETROOTS");
BEETROOTS_ENABLED_MINECRAFT = BUILDER
.define("Enabled:", true);
BEETROOTS_BIOME_TYPE_MINECRAFT = BUILDER
.comment("Default: [PLAINS]")
.define("Biome Type:", "PLAINS");
BEETROOTS_FREQUENCY_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Frequency:", 1);
BEETROOTS_PATCH_SIZE_MINECRAFT = BUILDER
.comment("Default [1]")
.define("Patch Size:", 1);
BUILDER.pop();

SPEC = BUILDER.build();
}
Expand Down
Loading

0 comments on commit 0ba1123

Please sign in to comment.