diff --git a/build.gradle b/build.gradle index e97a3ba5..bf5459ad 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { id 'maven-publish' id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7' id 'eclipse' - id 'com.gtnewhorizons.retrofuturagradle' version '1.3.33' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.35' id 'com.matthewprenger.cursegradle' version '1.4.0' } @@ -66,11 +66,11 @@ minecraft { // Add any properties you want to swap out for a dynamic value at build time here // Any properties here will be added to a class at build time, the name can be configured below // Example: - // injectedTags.put('VERSION', project.version) - // injectedTags.put('MOD_ID', project.archives_base_name) + injectedTags.put('VERSION', project.version) + injectedTags.put('MOD_ID', project.mod_id) } -// Generate a group.archives_base_name.Tags class +// Generate a group.mod_id.Tags class tasks.injectTags.configure { // Change Tags class' name here: outputClassName.set("${project.group}.${project.mod_id}.Tags") diff --git a/src/main/java/com/progwml6/natura/Natura.java b/src/main/java/com/progwml6/natura/Natura.java index 1ce13cc5..43e7662d 100644 --- a/src/main/java/com/progwml6/natura/Natura.java +++ b/src/main/java/com/progwml6/natura/Natura.java @@ -1,19 +1,5 @@ package com.progwml6.natura; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import net.minecraft.util.datafix.FixTypes; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ModFixs; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.Mod.Instance; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.relauncher.Side; - import com.progwml6.natura.common.CommonProxy; import com.progwml6.natura.common.config.Config; import com.progwml6.natura.common.gui.GuiHandler; @@ -28,29 +14,41 @@ import com.progwml6.natura.shared.NaturaCommons; import com.progwml6.natura.tools.NaturaTools; import com.progwml6.natura.world.NaturaWorld; +import net.minecraft.util.datafix.FixTypes; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.util.ModFixs; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.Mod.Instance; +import net.minecraftforge.fml.common.SidedProxy; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.relauncher.Side; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import slimeknights.mantle.pulsar.control.PulseManager; -@Mod(modid = Natura.modID, name = Natura.modName, version = Natura.modVersion, dependencies = "required-after:forge@[14.23.3.2673,);required-after:mantle@[1.12-1.3.0,);", acceptedMinecraftVersions = "[1.12, 1.13)") +@Mod(modid = Natura.modID, name = Natura.modName, version = Natura.modVersion, dependencies = "required-after:mantle@[1.12-1.3.0,);", acceptedMinecraftVersions = "[1.12, 1.13)") public class Natura { - public static final String modID = Util.MODID; + public static final String modID = Tags.MOD_ID; - public static final String modVersion = "${version}"; + public static final String modVersion = Tags.VERSION; public static final String modName = "Natura"; public static final Logger log = LogManager.getLogger(modID); /* Instance of this mod, used for grabbing prototype fields */ - @Instance(modID) - public static Natura instance; + @Instance(modID) public static Natura instance; - @SidedProxy(clientSide = "com.progwml6.natura.common.CommonProxy", serverSide = "com.progwml6.natura.common.CommonProxy") - public static CommonProxy proxy; + @SidedProxy(clientSide = "com.progwml6.natura.common.CommonProxy", serverSide = "com.progwml6.natura.common.CommonProxy") public static CommonProxy proxy; public static PulseManager pulseManager = new PulseManager(Config.pulseConfig); - - public static boolean isServer() { + + public static boolean isServer() + { return (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER); } @@ -64,7 +62,6 @@ public static boolean isServer() { pulseManager.registerPulse(new NaturaEntities()); pulseManager.registerPulse(new NaturaOredict()); pulseManager.registerPulse(new NaturaWorld()); - pulseManager.registerPulse(new CraftingTweaks()); } @@ -72,9 +69,10 @@ public static boolean isServer() { public void preInit(FMLPreInitializationEvent event) { Config.load(event); - - if (!isServer()) { - MinecraftForge.EVENT_BUS.register(new NaturaClientEvents()); + + if (!isServer()) + { + MinecraftForge.EVENT_BUS.register(new NaturaClientEvents()); } NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); diff --git a/src/main/java/com/progwml6/natura/library/Util.java b/src/main/java/com/progwml6/natura/library/Util.java index a49284be..4b53e8fe 100644 --- a/src/main/java/com/progwml6/natura/library/Util.java +++ b/src/main/java/com/progwml6/natura/library/Util.java @@ -2,13 +2,14 @@ import java.util.Locale; +import com.progwml6.natura.Tags; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraft.util.ResourceLocation; public class Util { - public static final String MODID = "natura"; + public static final String MODID = Tags.MOD_ID; public static final String RESOURCE = MODID.toLowerCase(Locale.US);