Skip to content

Commit

Permalink
Move Processor init to Common
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph T. McQuigg <[email protected]>
  • Loading branch information
JT122406 committed Sep 30, 2024
1 parent c0160d3 commit 18a9ab4
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import net.fabricmc.loom.api.LoomGradleExtensionAPI
plugins {
id("architectury-plugin") version "3.4-SNAPSHOT"
id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false
id("com.gradleup.shadow") version "8.3.1" apply false
id("com.gradleup.shadow") version "8.3.2" apply false
java
idea
kotlin("jvm") version "2.0.20"
Expand Down
1 change: 0 additions & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ dependencies {
modCompileOnly("com.cobblemon:mod:${project.properties["cobblemon_version"]}")

//BiomeMod Integration
modCompileOnly("com.github.glitchfiend:TerraBlender-common:$minecraftVersion-${project.properties["terrablender_version"]}")
modCompileOnly("net.potionstudios:Oh-The-Biomes-Weve-Gone-Common:${project.properties["BWG_version"]}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import generations.gg.generations.structures.generationsstructures.integration.Default;
import generations.gg.generations.structures.generationsstructures.integration.Integration;
import generations.gg.generations.structures.generationsstructures.processors.GenerationsProcessorLists;
import generations.gg.generations.structures.generationsstructures.processors.StructureProcessors;
import net.minecraft.resources.ResourceLocation;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -34,6 +35,7 @@ public class GenerationsStructures {
public static void init(Integration integration) {
CONFIG = ConfigLoader.loadConfig(Config.class, "structures", "config");
INTEGRATION = !CONFIG.integration.AllowIntegrations ? new Default() : integration;
StructureProcessors.init();
GenerationsProcessorLists.init();
if (integration.getModId() != null)
if ((integration.getModId().equals("biomesoplenty") && !CONFIG.integration.AllowBiomesOPlentyIntegration)
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
modRuntimeOnly("net.fabricmc:fabric-language-kotlin:1.12.1+kotlin.2.0.20")

//BiomeMod Integration
modApi("com.github.glitchfiend:TerraBlender-fabric:$minecraftVersion-${project.properties["terrablender_version"]}")
modLocalRuntime("com.github.glitchfiend:TerraBlender-fabric:$minecraftVersion-${project.properties["terrablender_version"]}")
modCompileOnly("net.potionstudios:Oh-The-Biomes-Weve-Gone-Fabric:${project.properties["BWG_version"]}") { isTransitive = false }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import generations.gg.generations.structures.generationsstructures.GenerationsStructures;
import generations.gg.generations.structures.generationsstructures.integration.BWG;
import generations.gg.generations.structures.generationsstructures.integration.Default;
import generations.gg.generations.structures.generationsstructures.processors.StructureProcessors;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.potionstudios.biomeswevegone.BiomesWeveGone;
Expand All @@ -18,6 +17,5 @@ public class GenerationsStructuresFabric implements ModInitializer {
@Override
public void onInitialize() {
GenerationsStructures.init(FabricLoader.getInstance().isModLoaded(BiomesWeveGone.MOD_ID) ? new BWG() : new Default());
StructureProcessors.init();
}
}
2 changes: 1 addition & 1 deletion forge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
modApi("com.cobblemon:forge:${project.properties["cobblemon_version"]}")

//BiomeMod Integration
modApi("com.github.glitchfiend:TerraBlender-forge:$minecraftVersion-${project.properties["terrablender_version"]}")
modLocalRuntime("com.github.glitchfiend:TerraBlender-forge:$minecraftVersion-${project.properties["terrablender_version"]}")
modApi("com.github.glitchfiend:BiomesOPlenty:$minecraftVersion-${project.properties["BOP_version"]}")
modRuntimeOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
modCompileOnly("net.potionstudios:Oh-The-Biomes-Weve-Gone-Forge:${project.properties["BWG_version"]}") { isTransitive = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
import generations.gg.generations.structures.generationsstructures.integration.BWG;
import generations.gg.generations.structures.generationsstructures.integration.Default;
import generations.gg.generations.structures.generationsstructures.integration.Integration;
import generations.gg.generations.structures.generationsstructures.processors.StructureProcessors;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

/**
* Forge initializer for Generations Structures
Expand All @@ -30,15 +26,5 @@ public GenerationsStructuresForge() {
else if (isBWG) integration = new BWG();
else integration = new Default();
GenerationsStructures.init(integration);
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
bus.addListener(this::commonSetup);
}

/**
* Queues all custom structure processor types for safe registration.
* @see FMLCommonSetupEvent
*/
private void commonSetup(final FMLCommonSetupEvent event) {
event.enqueueWork(StructureProcessors::init);
}
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fabric_loader_version=0.16.5
fabric_api_version=0.92.2

forge_version=47.3.10
neoforge_version=47.1.104
neoforge_version=47.1.106

use_neoforge=false

Expand All @@ -24,7 +24,7 @@ cobblemon_version=1.5.2+1.20.1

terrablender_version=3.0.1.7
BOP_version=18.0.0.598
BWG_version=1.2.3
BWG_version=1.3.0

# Publishing
github_token=xxx
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginManagement.repositories {
}

plugins {
id("com.gradle.develocity") version("3.18")
id("com.gradle.develocity") version("3.18.1")
}

develocity.buildScan {
Expand Down

0 comments on commit 18a9ab4

Please sign in to comment.