diff --git a/build.gradle b/build.gradle index 37ff86e..d258ebd 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.parchmentmc.librarian.forgegradle' -version = '1.18.2_3.2.3_forge' +version = '1.18.2_3.2.4_forge' group = 'wks.wolfkidsounds' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'wildplants' diff --git a/src/main/java/wks/wolfkidsounds/wildplants/ClientSetup.java b/src/main/java/wks/wolfkidsounds/wildplants/ClientSetup.java index 8694d88..72ec349 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/ClientSetup.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/ClientSetup.java @@ -18,17 +18,31 @@ public static void init(final FMLClientSetupEvent event) { } //IMMERSIVEENGINEERING - if (Configuration.ENABLE_IMMERSIVEENGINEERING.get() && Configuration.LOADED_IMMERSIVEENGINEERING) { + if (Configuration.LOADED_IMMERSIVEENGINEERING) { ItemBlockRenderTypes.setRenderLayer(ModBlocks.IMMERSIVEENGINEERING_WILD_HEMP.get(), RenderType.cutout()); } //VEGGIE_WAY - if (Configuration.ENABLE_VEGGIE_WAY.get() && Configuration.LOADED_VEGGIE_WAY) { + if (Configuration.LOADED_VEGGIE_WAY) { ItemBlockRenderTypes.setRenderLayer(ModBlocks.VEGGIEWAY_WILD_CORN.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(ModBlocks.VEGGIEWAY_WILD_LENTIL.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(ModBlocks.VEGGIEWAY_WILD_QUINOA.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(ModBlocks.VEGGIEWAY_WILD_SOYBEAN.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(ModBlocks.VEGGIEWAY_WILD_COTTON.get(), RenderType.cutout()); } + + //ENHANCEDFARMING + if (Configuration.LOADED_ENHANCEDFARMING) { + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_MINT.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_TOMATO.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_CUCUMBER.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_AUBERGINE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_GRAPE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_PINEAPPLE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_CORN.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_ONION.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_GARLIC.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ModBlocks.ENHANCEDFARMING_WILD_LETTUCE.get(), RenderType.cutout()); + } } } diff --git a/src/main/java/wks/wolfkidsounds/wildplants/CommonSetup.java b/src/main/java/wks/wolfkidsounds/wildplants/CommonSetup.java index 0206d3c..1d62082 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/CommonSetup.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/CommonSetup.java @@ -25,6 +25,12 @@ public static void init(final FMLCommonSetupEvent event) { WildCropGeneration.registerWildVeggieWayCropGeneration(); Wildplants.LOGGER.debug("setup-veggie_way"); } + + //ENHANCEDFARMING + if (Configuration.ENABLE_ENHANCEDFARMING.get() && Configuration.LOADED_ENHANCEDFARMING) { + WildCropGeneration.registerWildEnhancedFarmingCropGeneration(); + Wildplants.LOGGER.debug("setup-enhancedfarming"); + } }); } } diff --git a/src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java b/src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java index d87600e..8634f0c 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java @@ -11,10 +11,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import wks.wolfkidsounds.wildplants.block.ModBlocks; -import wks.wolfkidsounds.wildplants.config.Configuration; -import wks.wolfkidsounds.wildplants.config.ImmersiveEngineeringConfig; -import wks.wolfkidsounds.wildplants.config.MinecraftConfig; -import wks.wolfkidsounds.wildplants.config.VeggieWayConfig; +import wks.wolfkidsounds.wildplants.config.*; import wks.wolfkidsounds.wildplants.item.ModItems; import wks.wolfkidsounds.wildplants.registry.ModBiomeFeatures; import wks.wolfkidsounds.wildplants.registry.ModPlacementModifiers; @@ -46,6 +43,7 @@ public Wildplants() { ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, MinecraftConfig.SPEC, "wildplants/mods/minecraft.toml"); ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, ImmersiveEngineeringConfig.SPEC, "wildplants/mods/immersiveengineering.toml"); ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, VeggieWayConfig.SPEC, "wildplants/mods/veggieway.toml"); + ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, EnhancedFarmingConfig.SPEC, "wildplants/mods/enhancedfarming.toml"); LOGGER.debug("register-config"); //Registry diff --git a/src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java b/src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java index 789181d..0160e62 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java @@ -35,6 +35,18 @@ public class ModBlocks { public static final RegistryObject VEGGIEWAY_WILD_SOYBEAN = registerVeggieWayBlock("veggieway_wild_soybean", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); public static final RegistryObject VEGGIEWAY_WILD_COTTON = registerVeggieWayBlock("veggieway_wild_cotton", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + //ENHANCEDFARMING + public static final RegistryObject ENHANCEDFARMING_WILD_MINT = registerEnhancedFarmingBlock("enhancedfarming_wild_mint", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_TOMATO = registerEnhancedFarmingBlock("enhancedfarming_wild_tomato", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_CUCUMBER = registerEnhancedFarmingBlock("enhancedfarming_wild_cucumber", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_AUBERGINE = registerEnhancedFarmingBlock("enhancedfarming_wild_aubergine", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_GRAPE = registerEnhancedFarmingBlock("enhancedfarming_wild_grape", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_PINEAPPLE = registerEnhancedFarmingBlock("enhancedfarming_wild_pineapple", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_CORN = registerEnhancedFarmingBlock("enhancedfarming_wild_corn", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_ONION = registerEnhancedFarmingBlock("enhancedfarming_wild_onion", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_GARLIC = registerEnhancedFarmingBlock("enhancedfarming_wild_garlic", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + public static final RegistryObject ENHANCEDFARMING_WILD_LETTUCE = registerEnhancedFarmingBlock("enhancedfarming_wild_lettuce", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS))); + //---------------------------------------------------------------------------------------------- private static RegistryObject registerMinecraftBlock(String name, Supplier block) { RegistryObject toReturn = BLOCKS.register(name, block); @@ -47,7 +59,7 @@ private static RegistryObject registerMinecraftBlock(String private static RegistryObject registerImmersiveEngineeringBlock(String name, Supplier block) { RegistryObject toReturn = BLOCKS.register(name, block); - if (Configuration.ENABLE_IMMERSIVEENGINEERING.get() && Configuration.LOADED_IMMERSIVEENGINEERING) { + if (Configuration.LOADED_IMMERSIVEENGINEERING) { registerBlockItem(name, toReturn); Wildplants.LOGGER.debug("register-blocks-immersiveengineering"); } @@ -56,9 +68,18 @@ private static RegistryObject registerImmersiveEngineeringB private static RegistryObject registerVeggieWayBlock(String name, Supplier block) { RegistryObject toReturn = BLOCKS.register(name, block); - if (Configuration.ENABLE_VEGGIE_WAY.get() && Configuration.LOADED_VEGGIE_WAY) { + if (Configuration.LOADED_VEGGIE_WAY) { registerBlockItem(name, toReturn); - Wildplants.LOGGER.debug("register-blocks-immersiveengineering"); + Wildplants.LOGGER.debug("register-blocks-veggie_way"); + } + return toReturn; + } + + private static RegistryObject registerEnhancedFarmingBlock(String name, Supplier block) { + RegistryObject toReturn = BLOCKS.register(name, block); + if (Configuration.LOADED_ENHANCEDFARMING) { + registerBlockItem(name, toReturn); + Wildplants.LOGGER.debug("register-blocks-enhancedfarming"); } return toReturn; } @@ -69,9 +90,4 @@ private static void registerBlockItem(String name, RegistryObj ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(Wildplants.CREATIVE_MODE_TAB))); Wildplants.LOGGER.debug("register-block-ttems"); } - - public static void register(IEventBus eventBus) { - BLOCKS.register(eventBus); - Wildplants.LOGGER.debug("register-modblocks-moditems"); - } } diff --git a/src/main/java/wks/wolfkidsounds/wildplants/config/Configuration.java b/src/main/java/wks/wolfkidsounds/wildplants/config/Configuration.java index 6812205..7a5802f 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/config/Configuration.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/config/Configuration.java @@ -28,24 +28,15 @@ public class Configuration { BUILDER.push("General"); BUILDER.push("Global_Modifier"); - GLOBAL_FREQUENCY = BUILDER - .comment("How often to try to place a patch. (smaller is more) [Default: 64]") - .define("Frequency", 64); - GLOBAL_SPREAD_SIZE = BUILDER - .comment("How far apart crops are planted in a patch. (higher is more) [Default: 6]") - .define("Size", 4); + GLOBAL_FREQUENCY = BUILDER.comment("How often to try to place a patch. (smaller is more) [Default: 64]").define("Frequency", 64); + GLOBAL_SPREAD_SIZE = BUILDER.comment("How far apart crops are planted in a patch. (higher is more) [Default: 6]").define("Size", 4); BUILDER.pop(); BUILDER.push("Compat"); - ENABLE_MINECRAFT = BUILDER - .define("Minecraft", true); - ENABLE_IMMERSIVEENGINEERING = BUILDER - .define("Immersive_Engineering", true); - ENABLE_VEGGIE_WAY = BUILDER - .define("Veggie_Way", true); - ENABLE_HARVESTCRAFT = BUILDER - .define("Harvestcraft", true); - ENABLE_ENHANCEDFARMING = BUILDER - .define("EnhancedFarming", true); + ENABLE_MINECRAFT = BUILDER.define("Minecraft", true); + ENABLE_IMMERSIVEENGINEERING = BUILDER.define("Immersive_Engineering", true); + ENABLE_VEGGIE_WAY = BUILDER.define("Veggie_Way", true); + ENABLE_HARVESTCRAFT = BUILDER.define("Harvestcraft", true); + ENABLE_ENHANCEDFARMING = BUILDER.define("EnhancedFarming", true); BUILDER.pop(); BUILDER.pop(); diff --git a/src/main/java/wks/wolfkidsounds/wildplants/config/EnhancedFarmingConfig.java b/src/main/java/wks/wolfkidsounds/wildplants/config/EnhancedFarmingConfig.java new file mode 100644 index 0000000..d6e21bc --- /dev/null +++ b/src/main/java/wks/wolfkidsounds/wildplants/config/EnhancedFarmingConfig.java @@ -0,0 +1,98 @@ +package wks.wolfkidsounds.wildplants.config; + +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; + + //ENHANCEDFARMING + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_MINT; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_MINT; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_TOMATO; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_TOMATO; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_CUCUMBER; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_CUCUMBER; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_AUBERGINE; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_AUBERGINE; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_GRAPE; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_GRAPE; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_PINEAPPLE; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_PINEAPPLE; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_CORN; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_CORN; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_ONION; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_ONION; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_GARLIC; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_GARLIC; + + public static ForgeConfigSpec.ConfigValue CHANCE_ENHANCEDFARMING_WILD_LETTUCE; + public static ForgeConfigSpec.BooleanValue GENERATE_ENHANCEDFARMING_WILD_LETTUCE; + + static { + Wildplants.LOGGER.debug("init-enhancedfarming-feature-config"); + + BUILDER.push("ENHANCEDFARMING WILD MINT"); + GENERATE_ENHANCEDFARMING_WILD_MINT = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_MINT = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD TOMATO"); + GENERATE_ENHANCEDFARMING_WILD_TOMATO = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_TOMATO = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD CUCUMBER"); + GENERATE_ENHANCEDFARMING_WILD_CUCUMBER = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_CUCUMBER = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD AUBERGINE"); + GENERATE_ENHANCEDFARMING_WILD_AUBERGINE = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_AUBERGINE = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD GRAPE"); + GENERATE_ENHANCEDFARMING_WILD_GRAPE = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_GRAPE = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD PINEAPPLE"); + GENERATE_ENHANCEDFARMING_WILD_PINEAPPLE = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_PINEAPPLE = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD CORN"); + GENERATE_ENHANCEDFARMING_WILD_CORN = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_CORN = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD ONION"); + GENERATE_ENHANCEDFARMING_WILD_ONION = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_ONION = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD GARLIC"); + GENERATE_ENHANCEDFARMING_WILD_GARLIC = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_GARLIC = BUILDER.comment("SMALLER=MORE - Default [64]").define("Patch Size: ", 1); + BUILDER.pop(); + + BUILDER.push("ENHANCEDFARMING WILD LETTUCE"); + GENERATE_ENHANCEDFARMING_WILD_LETTUCE = BUILDER.define("Enabled:", true); + CHANCE_ENHANCEDFARMING_WILD_LETTUCE = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + BUILDER.pop(); + + + SPEC = BUILDER.build(); + } + +} \ No newline at end of file diff --git a/src/main/java/wks/wolfkidsounds/wildplants/config/ImmersiveEngineeringConfig.java b/src/main/java/wks/wolfkidsounds/wildplants/config/ImmersiveEngineeringConfig.java index d19fa42..13db10b 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/config/ImmersiveEngineeringConfig.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/config/ImmersiveEngineeringConfig.java @@ -2,6 +2,7 @@ import net.minecraftforge.common.ForgeConfigSpec; +import wks.wolfkidsounds.wildplants.Wildplants; public class ImmersiveEngineeringConfig { @@ -13,12 +14,10 @@ public class ImmersiveEngineeringConfig { public static ForgeConfigSpec.BooleanValue GENERATE_IMMERSIVEENGINEERING_WILD_HEMP; static { + Wildplants.LOGGER.debug("init-immersiveengineering-feature-config"); BUILDER.push("IMMERSIVEENGINEERING WILD HEMP"); - GENERATE_IMMERSIVEENGINEERING_WILD_HEMP = BUILDER - .define("Enabled:", true); - CHANCE_IMMERSIVEENGINEERING_WILD_HEMP = BUILDER - .comment("SMALLER=MORE - Default [64]") - .defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + GENERATE_IMMERSIVEENGINEERING_WILD_HEMP = BUILDER.define("Enabled:", true); + CHANCE_IMMERSIVEENGINEERING_WILD_HEMP = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); BUILDER.pop(); SPEC = BUILDER.build(); diff --git a/src/main/java/wks/wolfkidsounds/wildplants/config/MinecraftConfig.java b/src/main/java/wks/wolfkidsounds/wildplants/config/MinecraftConfig.java index 03e9ad4..29d4311 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/config/MinecraftConfig.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/config/MinecraftConfig.java @@ -1,6 +1,7 @@ package wks.wolfkidsounds.wildplants.config; import net.minecraftforge.common.ForgeConfigSpec; +import wks.wolfkidsounds.wildplants.Wildplants; public class MinecraftConfig { @@ -21,36 +22,25 @@ public class MinecraftConfig { public static ForgeConfigSpec.BooleanValue GENERATE_MINECRAFT_WILD_BEETROOTS; static { + Wildplants.LOGGER.debug("init-minecraft-feature-config"); BUILDER.push("MINECRAFT WILD WHEAT"); - GENERATE_MINECRAFT_WILD_WHEAT = BUILDER - .define("Enabled:", true); - CHANCE_MINECRAFT_WILD_WHEAT = BUILDER - .comment("SMALLER=MORE - Default [64]") - .defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + GENERATE_MINECRAFT_WILD_WHEAT = BUILDER.define("Enabled:", true); + CHANCE_MINECRAFT_WILD_WHEAT = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); BUILDER.pop(); BUILDER.push("MINECRAFT WILD CARROTS"); - GENERATE_MINECRAFT_WILD_CARROTS = BUILDER - .define("Enabled:", true); - CHANCE_MINECRAFT_WILD_CARROTS = BUILDER - .comment("SMALLER=MORE - Default [64]") - .defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); + GENERATE_MINECRAFT_WILD_CARROTS = BUILDER.define("Enabled:", true); + CHANCE_MINECRAFT_WILD_CARROTS = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); BUILDER.pop(); BUILDER.push("MINECRAFT WILD POTATOES"); - GENERATE_MINECRAFT_WILD_POTATOES = BUILDER - .define("Enabled:", true); - CHANCE_MINECRAFT_WILD_POTATOES = BUILDER - .comment("SMALLER=MORE - Default [64]") - .defineInRange("Chance:", 64, 5, Integer.MAX_VALUE); + GENERATE_MINECRAFT_WILD_POTATOES = BUILDER.define("Enabled:", true); + CHANCE_MINECRAFT_WILD_POTATOES = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 5, Integer.MAX_VALUE); BUILDER.pop(); BUILDER.push("MINECRAFT WILD BEETROOTS"); - GENERATE_MINECRAFT_WILD_BEETROOTS = BUILDER - .define("Enabled:", true); - CHANCE_MINECRAFT_WILD_BEETROOTS = BUILDER - .comment("SMALLER=MORE - Default [64]") - .defineInRange("Chance:", 64, 5, Integer.MAX_VALUE); + GENERATE_MINECRAFT_WILD_BEETROOTS = BUILDER.define("Enabled:", true); + CHANCE_MINECRAFT_WILD_BEETROOTS = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 5, Integer.MAX_VALUE); BUILDER.pop(); SPEC = BUILDER.build(); diff --git a/src/main/java/wks/wolfkidsounds/wildplants/config/VeggieWayConfig.java b/src/main/java/wks/wolfkidsounds/wildplants/config/VeggieWayConfig.java index dbb7b24..47b33bf 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/config/VeggieWayConfig.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/config/VeggieWayConfig.java @@ -1,6 +1,7 @@ package wks.wolfkidsounds.wildplants.config; import net.minecraftforge.common.ForgeConfigSpec; +import wks.wolfkidsounds.wildplants.Wildplants; public class VeggieWayConfig { public static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder(); @@ -25,6 +26,7 @@ public class VeggieWayConfig { //-------------------------------------------------------------- static { + Wildplants.LOGGER.debug("init-veggie_way-feature-config"); BUILDER.push("VEGGIEWAY WILD CORN"); GENERATE_VEGGIEWAY_WILD_CORN = BUILDER.define("Enabled:", true); CHANCE_VEGGIEWAY_WILD_CORN = BUILDER.comment("SMALLER=MORE - Default [64]").defineInRange("Chance:", 64, 0, Integer.MAX_VALUE); diff --git a/src/main/java/wks/wolfkidsounds/wildplants/event/CommonEvents.java b/src/main/java/wks/wolfkidsounds/wildplants/event/CommonEvents.java index 1d1b455..7e8cb54 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/event/CommonEvents.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/event/CommonEvents.java @@ -7,10 +7,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import wks.wolfkidsounds.wildplants.Wildplants; -import wks.wolfkidsounds.wildplants.config.Configuration; -import wks.wolfkidsounds.wildplants.config.ImmersiveEngineeringConfig; -import wks.wolfkidsounds.wildplants.config.MinecraftConfig; -import wks.wolfkidsounds.wildplants.config.VeggieWayConfig; +import wks.wolfkidsounds.wildplants.config.*; import wks.wolfkidsounds.wildplants.world.WildCropGeneration; @Mod.EventBusSubscriber(modid = Wildplants.MOD_ID) @@ -88,5 +85,62 @@ public static void onBiomeLoad(BiomeLoadingEvent event) { } Wildplants.LOGGER.debug("register-minecraft-biome-config"); } + + //CLIMATE_ENHANCEDFARMING + if (Configuration.ENABLE_ENHANCEDFARMING.get() && Configuration.LOADED_ENHANCEDFARMING) { + //TEMPERATE + if (climate.temperature >= 0.5F && climate.temperature <= 1.0F) { + //ENHANCEDFARMING + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_MINT.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_MINT); + } + } + + //WARM + if (climate.temperature >= 1.5F && climate.temperature <= 2.5F && climate.downfall <= 0.0F) { + //ENHANCEDFARMING + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_TOMATO.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_TOMATO); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_TOMATO.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_TOMATO); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_CUCUMBER.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_CUCUMBER); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_AUBERGINE.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_AUBERGINE); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_GRAPE.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_GRAPE); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_CORN.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_CORN); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_ONION.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_ONION); + } + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_GARLIC.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_GARLIC); + } + } + + //COLD + if (climate.temperature >= 0.2F && climate.temperature <= 0.3F) { + //ENHANCEDFARMING + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_LETTUCE.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_LETTUCE); + } + } + + //TROPICAL + if (climate.temperature >= 0.8F && climate.downfall >= 0.9F) { + //ENHANCEDFARMING + if (EnhancedFarmingConfig.GENERATE_ENHANCEDFARMING_WILD_PINEAPPLE.get()) { + builder.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WildCropGeneration.PATCH_WILD_ENHANCEDFARMING_PINEAPPLE); + } + } + Wildplants.LOGGER.debug("register-enhancedfarming-biome-config"); + } } } diff --git a/src/main/java/wks/wolfkidsounds/wildplants/world/WildCropGeneration.java b/src/main/java/wks/wolfkidsounds/wildplants/world/WildCropGeneration.java index 1782c79..07f86cd 100644 --- a/src/main/java/wks/wolfkidsounds/wildplants/world/WildCropGeneration.java +++ b/src/main/java/wks/wolfkidsounds/wildplants/world/WildCropGeneration.java @@ -16,14 +16,10 @@ import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; import net.minecraft.world.level.levelgen.placement.*; -import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.Tags; import wks.wolfkidsounds.wildplants.Wildplants; import wks.wolfkidsounds.wildplants.block.ModBlocks; -import wks.wolfkidsounds.wildplants.config.Configuration; -import wks.wolfkidsounds.wildplants.config.ImmersiveEngineeringConfig; -import wks.wolfkidsounds.wildplants.config.MinecraftConfig; -import wks.wolfkidsounds.wildplants.config.VeggieWayConfig; +import wks.wolfkidsounds.wildplants.config.*; import wks.wolfkidsounds.wildplants.registry.ModBiomeFeatures; import wks.wolfkidsounds.wildplants.world.settings.BiomeTagFilter; import wks.wolfkidsounds.wildplants.world.settings.WildCropConfig; @@ -64,6 +60,28 @@ public class WildCropGeneration { public static Holder PATCH_WILD_VEGGIE_WAY_SOYBEAN; public static Holder PATCH_WILD_VEGGIE_WAY_COTTON; + //ENHANCEDFARMING + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_MINT; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_TOMATO; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_CUCUMBER; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_AUBERGINE; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_GRAPE; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_PINEAPPLE; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_CORN; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_ONION; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_GARLIC; + public static Holder> FEATURE_PATCH_WILD_ENHANCEDFARMING_LETTUCE; + public static Holder PATCH_WILD_ENHANCEDFARMING_MINT; + public static Holder PATCH_WILD_ENHANCEDFARMING_TOMATO; + public static Holder PATCH_WILD_ENHANCEDFARMING_CUCUMBER; + public static Holder PATCH_WILD_ENHANCEDFARMING_AUBERGINE; + public static Holder PATCH_WILD_ENHANCEDFARMING_GRAPE; + public static Holder PATCH_WILD_ENHANCEDFARMING_PINEAPPLE; + public static Holder PATCH_WILD_ENHANCEDFARMING_CORN; + public static Holder PATCH_WILD_ENHANCEDFARMING_ONION; + public static Holder PATCH_WILD_ENHANCEDFARMING_GARLIC; + public static Holder PATCH_WILD_ENHANCEDFARMING_LETTUCE; + public static void registerWildMinecraftCropGeneration() { @@ -128,6 +146,34 @@ public static void registerWildVeggieWayCropGeneration() { } + public static void registerWildEnhancedFarmingCropGeneration() { + //CONFIGURE FEATURES + FEATURE_PATCH_WILD_ENHANCEDFARMING_MINT = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_MINT"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_MINT.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_TOMATO = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_TOMATO"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_TOMATO.get(), Blocks.DEAD_BUSH, BlockPredicate.matchesTag(BlockTags.SAND, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_CUCUMBER = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_CUCUMBER"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_CUCUMBER.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_AUBERGINE = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_AUBERGINE"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_AUBERGINE.get(), Blocks.DEAD_BUSH, BlockPredicate.matchesTag(BlockTags.SAND, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_GRAPE = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_GRAPE"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_GRAPE.get(), Blocks.DIRT, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_PINEAPPLE = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_PINEAPPLE"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_PINEAPPLE.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_CORN = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_CORN"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_CORN.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_ONION = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_ONION"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_ONION.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_GARLIC = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_GARLIC"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_GARLIC.get(), Blocks.DEAD_BUSH, BlockPredicate.matchesTag(BlockTags.SAND, BLOCK_BELOW))); + FEATURE_PATCH_WILD_ENHANCEDFARMING_LETTUCE = register(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_LETTUCE"), ModBiomeFeatures.WILD_CROP.get(), wildCropConfig(ModBlocks.ENHANCEDFARMING_WILD_LETTUCE.get(), Blocks.GRASS, BlockPredicate.matchesTag(BlockTags.DIRT, BLOCK_BELOW))); + + //CONFIGURE PATCH + PATCH_WILD_ENHANCEDFARMING_MINT = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_MINT"), FEATURE_PATCH_WILD_ENHANCEDFARMING_MINT, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_MINT.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_TOMATO = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_TOMATO"), FEATURE_PATCH_WILD_ENHANCEDFARMING_TOMATO, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_TOMATO.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_CUCUMBER = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_CUCUMBER"), FEATURE_PATCH_WILD_ENHANCEDFARMING_CUCUMBER, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_CUCUMBER.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_AUBERGINE = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_AUBERGINE"), FEATURE_PATCH_WILD_ENHANCEDFARMING_AUBERGINE, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_AUBERGINE.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_GRAPE = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_GRAPE"), FEATURE_PATCH_WILD_ENHANCEDFARMING_GRAPE, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_GRAPE.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_PINEAPPLE = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_PINEAPPLE"), FEATURE_PATCH_WILD_ENHANCEDFARMING_PINEAPPLE, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_PINEAPPLE.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_CORN = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_CORN"), FEATURE_PATCH_WILD_ENHANCEDFARMING_CORN, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_CORN.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_ONION = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_ONION"), FEATURE_PATCH_WILD_ENHANCEDFARMING_ONION, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_ONION.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_GARLIC = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_GARLIC"), FEATURE_PATCH_WILD_ENHANCEDFARMING_GARLIC, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_GARLIC.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + PATCH_WILD_ENHANCEDFARMING_LETTUCE = registerPlacement(new ResourceLocation(Wildplants.MOD_ID, "patch_enhancedfarming_wild_LETTUCE"), FEATURE_PATCH_WILD_ENHANCEDFARMING_LETTUCE, RarityFilter.onAverageOnceEvery(EnhancedFarmingConfig.CHANCE_ENHANCEDFARMING_WILD_LETTUCE.get()), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome(), TAGGED_IS_OVERWORLD); + + Wildplants.LOGGER.debug("register-enhancedfarming-gen"); + } + //-------------------------------------------------------------------------- public static WildCropConfig wildCropConfig(Block primaryBlock, Block secondaryBlock, BlockPredicate plantedOn) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index f0c8ee5..2f884c9 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,7 +4,7 @@ license="GNU General Public License version 3 (GPLv3)" [[mods]] modId="wildplants" -version="1.18.2_3.2.3´_forge" +version="1.18.2_3.2.4´_forge" displayName="Wildplants" credits="wolfkidsounds" displayURL="https://wolfkidsounds.com" diff --git a/src/main/resources/assets/wildplants/lang/en_us.json b/src/main/resources/assets/wildplants/lang/en_us.json index f86b689..674f4d2 100644 --- a/src/main/resources/assets/wildplants/lang/en_us.json +++ b/src/main/resources/assets/wildplants/lang/en_us.json @@ -91,5 +91,16 @@ "block.wildplants.harvestcraft_wild_waterchestnut": "Wild Waterchestnut", "block.wildplants.harvestcraft_wild_whitemushroom": "Wild White Mushroom", "block.wildplants.harvestcraft_wild_wintersquash": "Wild Wintersquash", - "block.wildplants.harvestcraft_wild_zucchini": "Wild Zucchini" + "block.wildplants.harvestcraft_wild_zucchini": "Wild Zucchini", + + "block.wildplants.enhancedfarming_wild_mint" : "Wild Mint", + "block.wildplants.enhancedfarming_wild_tomato" : "Wild Tomato", + "block.wildplants.enhancedfarming_wild_cucumber" : "Wild Cucumber", + "block.wildplants.enhancedfarming_wild_aubergine" : "Wild Aubergine", + "block.wildplants.enhancedfarming_wild_grape" : "Wild Grape", + "block.wildplants.enhancedfarming_wild_pineapple" : "Wild Pineapple", + "block.wildplants.enhancedfarming_wild_corn" : "Wild Corn", + "block.wildplants.enhancedfarming_wild_onion" : "Wild Onion", + "block.wildplants.enhancedfarming_wild_garlic" : "Wild Garlic", + "block.wildplants.enhancedfarming_wild_lettuce" : "Wild Lettuce" } \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_aubergine.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_aubergine.json new file mode 100644 index 0000000..cbeb715 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_aubergine.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/aubergine_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_corn.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_corn.json new file mode 100644 index 0000000..7476b4f --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_corn.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/corn_crop_7" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_cucumber.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_cucumber.json new file mode 100644 index 0000000..b9dd2d7 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_cucumber.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/cucumber_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_garlic.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_garlic.json new file mode 100644 index 0000000..a3b2393 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_garlic.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/garlic_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_grape.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_grape.json new file mode 100644 index 0000000..278dc49 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_grape.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/grape_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_lettuce.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_lettuce.json new file mode 100644 index 0000000..414667e --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_lettuce.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/lettuce_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_mint.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_mint.json new file mode 100644 index 0000000..d769727 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_mint.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/mint_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_onion.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_onion.json new file mode 100644 index 0000000..1da38b7 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_onion.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/onion_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_pineapple.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_pineapple.json new file mode 100644 index 0000000..1c2fe1c --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_pineapple.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/pineapple_crop_5" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_tomato.json b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_tomato.json new file mode 100644 index 0000000..e4945c3 --- /dev/null +++ b/src/main/resources/assets/wildplants/models/item/enhancedfarming_wild_tomato.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "enhancedfarming:block/crops/tomato_crop_6" + } +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_aubergine.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_aubergine.json new file mode 100644 index 0000000..439a361 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_aubergine.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:aubergine_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:aubergine" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:aubergine_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:aubergine_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:aubergine_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_corn.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_corn.json new file mode 100644 index 0000000..9d049a5 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_corn.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:corn_crop", + "properties": { + "age": "7" + } + } + ], + "name": "enhancedfarming:corn" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:corn_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:corn_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:corn_crop", + "properties": { + "age": "7" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_cucumber.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_cucumber.json new file mode 100644 index 0000000..603ad6d --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_cucumber.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:cucumber_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:cucumber" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:cucumber_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:cucumber_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:cucumber_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_garlic.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_garlic.json new file mode 100644 index 0000000..56709f6 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_garlic.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:garlic_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:garlic" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:garlic_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:garlic_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:garlic_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_grape.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_grape.json new file mode 100644 index 0000000..15edb31 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_grape.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:grape_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:grapes" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:grape_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:grape_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:grape_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_lettuce.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_lettuce.json new file mode 100644 index 0000000..e67646f --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_lettuce.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:lettuce_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:lettuce" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:lettuce_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:lettuce_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:lettuce_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_mint.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_mint.json new file mode 100644 index 0000000..4f5dc92 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_mint.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:mint_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:mint" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:mint_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:mint_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:mint_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_nether_flower.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_nether_flower.json new file mode 100644 index 0000000..6bb3c3c --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_nether_flower.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:nether_flower_crop", + "properties": { + "age": "5" + } + } + ], + "name": "minecraft:blaze_rod" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:nether_flower_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:nether_flower_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:nether_flower_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_onion.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_onion.json new file mode 100644 index 0000000..0a80a20 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_onion.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:onion_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:onion" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:onion_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:onion_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:onion_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_pineapple.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_pineapple.json new file mode 100644 index 0000000..7239b80 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_pineapple.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:pineapple_crop", + "properties": { + "age": "5" + } + } + ], + "name": "enhancedfarming:pineapple" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:pineapple_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:pineapple_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:pineapple_crop", + "properties": { + "age": "5" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_tomato.json b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_tomato.json new file mode 100644 index 0000000..2788938 --- /dev/null +++ b/src/main/resources/data/wildplants/loot_tables/blocks/enhancedfarming_wild_tomato.json @@ -0,0 +1,66 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:tomato_crop", + "properties": { + "age": "6" + } + } + ], + "name": "enhancedfarming:tomato" + }, + { + "type": "minecraft:item", + "name": "enhancedfarming:tomato_seeds" + } + ] + } + ] + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:apply_bonus", + "enchantment": "minecraft:fortune", + "formula": "minecraft:binomial_with_bonus_count", + "parameters": { + "extra": 3, + "probability": 0.5714286 + } + } + ], + "name": "enhancedfarming:tomato_seeds" + } + ], + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "enhancedfarming:tomato_crop", + "properties": { + "age": "6" + } + } + ] + } + ], + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ] +} \ No newline at end of file