Skip to content

Commit

Permalink
Merge pull request #78 from EpimorphicPioneers/dancingsnow-dev
Browse files Browse the repository at this point in the history
update dependencies
  • Loading branch information
qwer523 authored Aug 4, 2024
2 parents 010111f + b7dc02a commit 16c3985
Show file tree
Hide file tree
Showing 91 changed files with 1,391 additions and 376 deletions.
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ dependencies {

if (System.getenv("RUN_SERVER") == null) {
modRuntimeOnly(forge.shimmer.forge) { transitive = false } // Shimmer
modRuntimeOnly("maven.modrinth:embeddium:0.2.10+mc1.20.1") // Embeddium
modRuntimeOnly("maven.modrinth:oculus:1.20.1-1.6.9") // Oculus
modRuntimeOnly("maven.modrinth:embeddium:0.3.19+mc1.20.1") // Embeddium
modRuntimeOnly("maven.modrinth:oculus:1.20.1-1.7.0") // Oculus
}

// Runtime only testing mods
Expand Down
16 changes: 8 additions & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ dependencyResolutionManagement {

// Mod Dependencies Versions
// Common
def jeiVersion = "15.2.0.27"
def reiVersion = "12.0.684"
def emiVersion = "1.0.30"
def ae2Version = "15.0.18"
def jeiVersion = "15.8.0.11"
def reiVersion = "12.1.725"
def emiVersion = "1.1.10"
def ae2Version = "15.2.11"
def kjsVersion = "2001.6.4-build.120"
def auVersion = "1.20.1-0.6.0"
def gtmVersion = "1.2.3.a"
def gtmVersion = "1.3.1"

// Forge
def forgeVersion = "47.2.0"
Expand All @@ -42,10 +42,10 @@ dependencyResolutionManagement {
def vineFlowerVersion = "1.+"
def macheteVersion = "1.+"
def configurationVersion = "2.2.0"
def ldLibVersion = "1.0.25.j"
def ldLibVersion = "1.0.26"
def mixinextrasVersion = "0.2.0"
def shimmerVersion = "0.2.2"
def monomorphismLibVersion = "1.1.0-build.22"
def shimmerVersion = "0.2.4"
def monomorphismLibVersion = "1.1.1-build.27"
def spotlessVersion = "7.0.0.BETA1"

forge {
Expand Down
31 changes: 24 additions & 7 deletions src/main/java/com/epimorphismmc/epimorphism/EPGTAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@

import com.epimorphismmc.epimorphism.api.data.chemical.material.info.EPMaterialIconSet;
import com.epimorphismmc.epimorphism.api.data.chemical.material.info.EPMaterialIconType;
import com.epimorphismmc.epimorphism.api.data.tag.EPTagPrefix;
import com.epimorphismmc.epimorphism.common.data.EPDimensionTypes;
import com.epimorphismmc.epimorphism.common.data.EPItems;
import com.epimorphismmc.epimorphism.common.data.EPParticleTypes;
import com.epimorphismmc.epimorphism.data.recipe.GTRecipeManager;

import com.epimorphismmc.monomorphism.MOGTAddon;

import com.gregtechceu.gtceu.api.addon.GTAddon;
import com.gregtechceu.gtceu.api.addon.IGTAddon;
import com.gregtechceu.gtceu.api.registry.registrate.GTRegistrate;

import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.resources.ResourceLocation;

import java.util.function.Consumer;

@GTAddon
public class EPGTAddon extends MOGTAddon {
public class EPGTAddon implements IGTAddon {

@Override
public String addonModId() {
return Epimorphism.MOD_ID;
}

public EPGTAddon() {
super(Epimorphism.MOD_ID);
@Override
public GTRegistrate getRegistrate() {
return EpimorphismCommon.registrate();
}

@Override
Expand All @@ -29,9 +39,16 @@ public boolean requiresHighTier() {
public void initializeAddon() {
EPMaterialIconSet.init();
EPMaterialIconType.init();
Epimorphism.proxy().init();
GTRecipeManager.onGTPostInitialization();
Epimorphism.logger().info("Epimorphism's GT Addon Loaded!");
EPItems.init();
EPDimensionTypes.init();
EPParticleTypes.init();
Epimorphism.LOGGER.info("Epimorphism's GT Addon Loaded!");
}

@Override
public void registerTagPrefixes() {
EPTagPrefix.init();
}

@Override
Expand Down
84 changes: 8 additions & 76 deletions src/main/java/com/epimorphismmc/epimorphism/Epimorphism.java
Original file line number Diff line number Diff line change
@@ -1,92 +1,24 @@
package com.epimorphismmc.epimorphism;

import com.epimorphismmc.epimorphism.client.ClientProxy;
import com.epimorphismmc.epimorphism.common.CommonProxy;
import com.epimorphismmc.epimorphism.config.EPConfigHolder;
import com.epimorphismmc.epimorphism.data.lang.EPLangHandler;
import com.epimorphismmc.epimorphism.network.s2c.PacketVajraDestroy;

import com.epimorphismmc.monomorphism.MOMod;
import com.epimorphismmc.monomorphism.datagen.MOProviderTypes;
import com.epimorphismmc.monomorphism.registry.registrate.MORegistrate;
import com.epimorphismmc.monomorphism.utility.DistLogger;

import com.gregtechceu.gtceu.utils.FormattingUtil;

import com.lowdragmc.lowdraglib.networking.INetworking;

import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.common.Mod;

import org.slf4j.Logger;

@Mod(Epimorphism.MOD_ID)
public class Epimorphism extends MOMod<CommonProxy> {
public static final String MOD_ID = "epimorphism";
public static final String NAME = "Epimorphism";

public static Epimorphism instance;

public Epimorphism() {
super();
}

@Override
public String getModId() {
return MOD_ID;
}

@Override
public String getModName() {
return NAME;
}

@Override
protected void onModConstructed() {
instance = this;
EPConfigHolder.init();
}

@Override
@OnlyIn(Dist.CLIENT)
protected CommonProxy createClientProxy() {
return new ClientProxy();
}

@Override
@OnlyIn(Dist.DEDICATED_SERVER)
protected CommonProxy createServerProxy() {
return new CommonProxy();
}
public interface Epimorphism {
String MOD_ID = "epimorphism";
String NAME = "Epimorphism";

@Override
public void addDataGenerator(MORegistrate registrate) {
registrate.addDataGenerator(MOProviderTypes.MO_LANG, EPLangHandler::init);
}
Logger LOGGER = new DistLogger(NAME);

@Override
public void registerPackets(INetworking network) {
network.registerS2C(PacketVajraDestroy.class);
static Epimorphism instance() {
return EpimorphismCommon.instance();
}

public static ResourceLocation id(String path) {
static ResourceLocation id(String path) {
return new ResourceLocation(MOD_ID, FormattingUtil.toLowerCaseUnder(path));
}

public static Logger logger() {
return instance.getLogger();
}

public static CommonProxy proxy() {
return instance.getProxy();
}

public static MORegistrate registrate() {
return instance.getRegistrate();
}

public static INetworking network() {
return instance.getNetwork();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.epimorphismmc.epimorphism;

import com.epimorphismmc.epimorphism.client.EpimorphismClient;

import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;

@Mod(Epimorphism.MOD_ID)
public class EpimorphismBootstrap {
public EpimorphismBootstrap() {
DistExecutor.unsafeRunForDist(() -> EpimorphismClient::new, () -> EpimorphismServer::new);
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package com.epimorphismmc.epimorphism.common;
package com.epimorphismmc.epimorphism;

import com.epimorphismmc.epimorphism.Epimorphism;
import com.epimorphismmc.epimorphism.api.data.tag.EPTagPrefix;
import com.epimorphismmc.epimorphism.api.event.GTRecipeEvent;
import com.epimorphismmc.epimorphism.common.block.BlockMaps;
import com.epimorphismmc.epimorphism.common.block.BlockTypeAdditions;
import com.epimorphismmc.epimorphism.common.data.EPBlocks;
import com.epimorphismmc.epimorphism.common.data.EPCovers;
import com.epimorphismmc.epimorphism.common.data.EPCreativeModeTabs;
import com.epimorphismmc.epimorphism.common.data.EPDimensionTypes;
import com.epimorphismmc.epimorphism.common.data.EPElements;
import com.epimorphismmc.epimorphism.common.data.EPItems;
import com.epimorphismmc.epimorphism.common.data.EPMachines;
import com.epimorphismmc.epimorphism.common.data.EPMaterials;
import com.epimorphismmc.epimorphism.common.data.EPParticleTypes;
import com.epimorphismmc.epimorphism.common.data.EPRecipeConditions;
import com.epimorphismmc.epimorphism.common.data.EPRecipeTypes;
import com.epimorphismmc.epimorphism.common.data.EPRecipes;
import com.epimorphismmc.epimorphism.config.EPConfigHolder;
import com.epimorphismmc.epimorphism.data.lang.EPLangHandler;
import com.epimorphismmc.epimorphism.data.recipe.GTRecipeManager;
import com.epimorphismmc.epimorphism.data.recipe.handler.GTRecipeHandlerManager;
import com.epimorphismmc.epimorphism.network.s2c.PacketVajraDestroy;

import com.epimorphismmc.monomorphism.proxy.base.ICommonProxyBase;
import com.epimorphismmc.monomorphism.registry.registrate.MORegistrate;
import com.epimorphismmc.monomorphism.registry.registrate.providers.MOProviderTypes;

import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.cover.CoverDefinition;
Expand All @@ -30,81 +30,102 @@
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.recipe.RecipeCondition;
import com.gregtechceu.gtceu.common.data.GTCreativeModeTabs;
import com.gregtechceu.gtceu.common.unification.material.MaterialRegistryManager;

import com.lowdragmc.lowdraglib.networking.INetworking;
import com.lowdragmc.lowdraglib.networking.LDLNetworking;

import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

public class CommonProxy implements ICommonProxyBase {
public class EpimorphismCommon implements Epimorphism {

private static EpimorphismCommon instance;
private static final MORegistrate REGISTRATE = MORegistrate.create(MOD_ID);
private static final INetworking NETWORK =
LDLNetworking.createNetworking(new ResourceLocation(MOD_ID, "networking"), "0.0.1");

public EpimorphismCommon() {
instance = this;

EPConfigHolder.init();

registerPackets(NETWORK);
registerEventHandlers();

REGISTRATE.addDataGenerator(MOProviderTypes.MO_LANG, EPLangHandler::init);

Epimorphism.LOGGER.info("Epimorphism's Initialization Completed!");
}

public void registerPackets(INetworking network) {
network.registerS2C(PacketVajraDestroy.class);
}

public CommonProxy() {
public void registerEventHandlers() {
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
eventBus.register(this);

REGISTRATE.registerEventListeners(eventBus);

EPParticleTypes.register(eventBus);
Epimorphism.logger().info("Epimorphism's Initialization Completed!");
}

public void init() {
EPItems.init();
EPDimensionTypes.init();
EPParticleTypes.init();
eventBus.addGenericListener(Element.class, this::registerElements);
eventBus.addGenericListener(GTRecipeType.class, this::registerRecipeTypes);
eventBus.addGenericListener(
(Class<Class<? extends RecipeCondition>>) RecipeCondition.class.getClass(),
this::registerRecipeConditions);
eventBus.addGenericListener(MachineDefinition.class, this::registerMachineDefinitions);
eventBus.addGenericListener(CoverDefinition.class, this::registerCoverDefinitions);
}

/* -------------------------------------------------- Registration Methods -------------------------------------------------- */

@Override
public void registerEventHandlers() {}
public static EpimorphismCommon instance() {
return instance;
}

@Override
public void registerCapabilities() {}
public static MORegistrate registrate() {
return REGISTRATE;
}

@Override
public void registerTagPrefixes() {
EPTagPrefix.init();
public static INetworking network() {
return NETWORK;
}

@Override
public void registerElements(GTCEuAPI.RegisterEvent<String, Element> event) {
EPElements.init();
}

@Override
public void registerCoverDefinitions(
GTCEuAPI.RegisterEvent<ResourceLocation, CoverDefinition> event) {
EPCovers.init();
}

@Override
public void registerMachineDefinitions(
GTCEuAPI.RegisterEvent<ResourceLocation, MachineDefinition> event) {
EPCreativeModeTabs.init();
EPBlocks.init();
EPMachines.init();
}

@Override
public void registerRecipeTypes(GTCEuAPI.RegisterEvent<ResourceLocation, GTRecipeType> event) {
EPRecipeTypes.init();
}

@Override
public void registerRecipeConditions(
GTCEuAPI.RegisterEvent<String, Class<? extends RecipeCondition>> event) {
EPRecipeConditions.init();
}

@Override
@SubscribeEvent
public void registerMaterials(MaterialEvent event) {
EPMaterials.init();
}

@Override
@SubscribeEvent
public void registerMaterialRegistry(MaterialRegistryEvent event) {
Epimorphism.registrate().creativeModeTab(GTCreativeModeTabs.MATERIAL_ITEM);
MaterialRegistryManager.getInstance().createRegistry(Epimorphism.MOD_ID);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.epimorphismmc.epimorphism;

public class EpimorphismServer extends EpimorphismCommon {
public EpimorphismServer() {
super();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.epimorphismmc.monomorphism.block.tier.ITierType;

import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.client.TooltipHelper;
import com.gregtechceu.gtceu.client.util.TooltipHelper;

import net.minecraft.network.chat.Component;

Expand Down
Loading

0 comments on commit 16c3985

Please sign in to comment.