Skip to content

Commit

Permalink
1.18.2 - 3.2.6
Browse files Browse the repository at this point in the history
- Proper Support for Enhanced Farming
- Fixed a crash related to Enhanced Farming Compat

- Reworked Temperature & Downfall Systems (Climate Zones)
- Introduced variables for climate zones
- Fixed a bug where arid biomes return nullPointer

- bumped version
  • Loading branch information
wolfkidsounds committed Feb 5, 2023
1 parent 1fcd2aa commit aaa7485
Show file tree
Hide file tree
Showing 274 changed files with 5,001 additions and 65 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'


version = '1.18.2_3.2.5_forge'
version = '1.18.2_3.2.6_forge'
group = 'wks.wolfkidsounds' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'wildplants'

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/wks/wolfkidsounds/wildplants/ClientSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,19 @@ public static void init(final FMLClientSetupEvent event) {
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());
}
}
}
12 changes: 9 additions & 3 deletions src/main/java/wks/wolfkidsounds/wildplants/CommonSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,25 @@ public static void init(final FMLCommonSetupEvent event) {
//MINECRAFT
if (Configuration.ENABLE_MINECRAFT.get()) {
WildCropGeneration.registerWildMinecraftCropGeneration();
Wildplants.LOGGER.debug("setup-minecraft");
//Wildplants.LOGGER.debug("setup-minecraft");
}

//IMMERSIVENGINEERING
if (Configuration.ENABLE_IMMERSIVEENGINEERING.get() && Configuration.LOADED_IMMERSIVEENGINEERING) {
WildCropGeneration.registerWildImmersiveEngineeringCropGeneration();
Wildplants.LOGGER.debug("setup-immersiveengineering");
//Wildplants.LOGGER.debug("setup-immersiveengineering");
}

//VEGGIE_WAY
if (Configuration.ENABLE_VEGGIE_WAY.get() && Configuration.LOADED_VEGGIE_WAY) {
WildCropGeneration.registerWildVeggieWayCropGeneration();
Wildplants.LOGGER.debug("setup-veggie_way");
//Wildplants.LOGGER.debug("setup-veggie_way");
}

//ENHANCEDFARMING
if (Configuration.ENABLE_ENHANCEDFARMING.get() && Configuration.LOADED_ENHANCEDFARMING) {
WildCropGeneration.registerWildEnhancedFarmingCropGeneration();
//Wildplants.LOGGER.debug("setup-enhancedfarming");
}
});
}
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/wks/wolfkidsounds/wildplants/Wildplants.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@ public Wildplants() {

modEventBus.addListener(CommonSetup::init);
modEventBus.addListener(ClientSetup::init);
LOGGER.debug("register-eventbus");
//LOGGER.debug("register-eventbus");

//Configurations
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, Configuration.SPEC, "wildplants/wildplants-common.toml");

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");
//ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, HarvestcraftConfig.SPEC, "wildplants/mods/harvestcraft.toml");
LOGGER.debug("register-config");
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, EnhancedFarmingConfig.SPEC, "wildplants/mods/enhancedfarming.toml");
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, HarvestcraftConfig.SPEC, "wildplants/mods/harvestcraft.toml");
//LOGGER.debug("register-config");

//Registry
ModBlocks.BLOCKS.register(modEventBus);
ModItems.ITEMS.register(modEventBus);
ModBiomeFeatures.FEATURES.register(modEventBus);
ModPlacementModifiers.PLACEMENT_MODIFIERS.register(modEventBus);
LOGGER.debug("register-ModObjects");
//LOGGER.debug("register-ModObjects");

MinecraftForge.EVENT_BUS.register(this);
LOGGER.debug("register-eventbus");
//LOGGER.debug("register-eventbus");
}
}
29 changes: 25 additions & 4 deletions src/main/java/wks/wolfkidsounds/wildplants/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,24 @@ public class ModBlocks {
public static final RegistryObject<Block> VEGGIEWAY_WILD_SOYBEAN = registerVeggieWayBlock("veggieway_wild_soybean", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> VEGGIEWAY_WILD_COTTON = registerVeggieWayBlock("veggieway_wild_cotton", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));

//ENHANCEDFARMING
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_MINT = registerEnhancedFarmingBlock("enhancedfarming_wild_mint", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_TOMATO = registerEnhancedFarmingBlock("enhancedfarming_wild_tomato", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_CUCUMBER = registerEnhancedFarmingBlock("enhancedfarming_wild_cucumber", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_AUBERGINE = registerEnhancedFarmingBlock("enhancedfarming_wild_aubergine", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_GRAPE = registerEnhancedFarmingBlock("enhancedfarming_wild_grape", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_PINEAPPLE = registerEnhancedFarmingBlock("enhancedfarming_wild_pineapple", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_CORN = registerEnhancedFarmingBlock("enhancedfarming_wild_corn", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_ONION = registerEnhancedFarmingBlock("enhancedfarming_wild_onion", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_GARLIC = registerEnhancedFarmingBlock("enhancedfarming_wild_garlic", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));
public static final RegistryObject<Block> ENHANCEDFARMING_WILD_LETTUCE = registerEnhancedFarmingBlock("enhancedfarming_wild_lettuce", () -> new WildCropBlock(MobEffects.GLOWING, 1, Block.Properties.copy(Blocks.TALL_GRASS)));

//----------------------------------------------------------------------------------------------
private static <T extends Block> RegistryObject<T> registerMinecraftBlock(String name, Supplier<T> block) {
RegistryObject<T> toReturn = BLOCKS.register(name, block);
if (Configuration.ENABLE_MINECRAFT.get()) {
registerBlockItem(name, toReturn);
Wildplants.LOGGER.debug("register-blocks-minecraft");
//Wildplants.LOGGER.debug("register-blocks-minecraft");
}
return toReturn;
}
Expand All @@ -47,7 +59,7 @@ private static <T extends Block> RegistryObject<T> registerImmersiveEngineeringB
RegistryObject<T> toReturn = BLOCKS.register(name, block);
if (Configuration.LOADED_IMMERSIVEENGINEERING) {
registerBlockItem(name, toReturn);
Wildplants.LOGGER.debug("register-blocks-immersiveengineering");
//Wildplants.LOGGER.debug("register-blocks-immersiveengineering");
}
return toReturn;
}
Expand All @@ -56,7 +68,16 @@ private static <T extends Block> RegistryObject<T> registerVeggieWayBlock(String
RegistryObject<T> toReturn = BLOCKS.register(name, block);
if (Configuration.LOADED_VEGGIE_WAY) {
registerBlockItem(name, toReturn);
Wildplants.LOGGER.debug("register-blocks-veggie_way");
//Wildplants.LOGGER.debug("register-blocks-veggie_way");
}
return toReturn;
}

private static <T extends Block> RegistryObject<T> registerEnhancedFarmingBlock(String name, Supplier<T> block) {
RegistryObject<T> toReturn = BLOCKS.register(name, block);
if (Configuration.LOADED_ENHANCEDFARMING) {
registerBlockItem(name, toReturn);
//Wildplants.LOGGER.debug("register-blocks-enhancedfarming");
}
return toReturn;
}
Expand All @@ -65,6 +86,6 @@ private static <T extends Block> RegistryObject<T> registerVeggieWayBlock(String

private static <T extends Block> void registerBlockItem(String name, RegistryObject<T> block) {
ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().tab(Wildplants.CREATIVE_MODE_TAB)));
Wildplants.LOGGER.debug("register-block-ttems");
//Wildplants.LOGGER.debug("register-block-ttems");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
public class WildCropBlock extends FlowerBlock {
public WildCropBlock(MobEffect suspiciousStewEffect, int effectDuration, Properties properties) {
super(suspiciousStewEffect, effectDuration, properties);
Wildplants.LOGGER.debug("configure-cropblock");
//Wildplants.LOGGER.debug("configure-cropblock");
}
}
Loading

0 comments on commit aaa7485

Please sign in to comment.