diff --git a/dependencies.gradle b/dependencies.gradle index 9628ef2..9ef00ce 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,3 +1,3 @@ dependencies { - api 'com.github.GTNewHorizons:MrTJPCore:1.1.5:dev' + api 'com.github.GTNewHorizons:MrTJPCore:1.1.6:dev' } diff --git a/gradle.properties b/gradle.properties index b056643..111a809 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ channel = stable mappingsVersion = 12 # Defines other MCP mappings for dependency deobfuscation. -remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ +remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/ # Select a default username for testing your mod. You can always override this per-run by running # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. @@ -50,10 +50,10 @@ enableGenericInjection = false # Generate a class with a String field for the mod version named as defined below. # If generateGradleTokenClass is empty or not missing, no such class will be generated. # If gradleTokenVersion is empty or missing, the field will not be present in the class. -generateGradleTokenClass = +generateGradleTokenClass = mrtjp.relocation.Tags # Name of the token containing the project's current version to generate/replace. -gradleTokenVersion = GRADLETOKEN_VERSION +gradleTokenVersion = VERSION # [DEPRECATED] Mod ID replacement token. gradleTokenModId = @@ -61,13 +61,16 @@ gradleTokenModId = # [DEPRECATED] Mod name replacement token. gradleTokenModName = +# [DEPRECATED] Mod Group replacement token. +gradleTokenGroupName = + # [DEPRECATED] # Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java # public static final String VERSION = "GRADLETOKEN_VERSION"; # The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's # version in @Mod([...], version = VERSION, [...]). # Leave these properties empty to skip individual token replacements. -replaceGradleTokenInFile = mod.scala,package-info.java +replaceGradleTokenInFile = # In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can # leave this property empty. @@ -123,7 +126,7 @@ includeWellKnownRepositories = true usesMavenPublishing = true # Maven repository to publish the mod to. -# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/ +# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/ # Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token. # @@ -187,5 +190,3 @@ curseForgeRelations = # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true -# Non-GTNH properties -gradleTokenGroupName = diff --git a/settings.gradle b/settings.gradle index e8946ad..16a5b4c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14' } diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index e88f8d6..8ffdc21 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -12,11 +12,7 @@ "credits": "", "logoFile": "", "screenshots": [], - "parent": "", - "requiredMods": ["MrTJPCoreMod"], - "dependencies": [], - "dependants": [], - "useDependencyInformation": true + "parent": "" }, { "modid": "MCFrames", @@ -30,10 +26,6 @@ "credits": "", "logoFile": "fr_logo.png", "screenshots": [], - "parent": "", - "requiredMods": ["${modId}"], - "dependencies": [], - "dependants": [], - "useDependencyInformation": true + "parent": "" }] } diff --git a/src/main/scala/mrtjp/mcframes/api/package-info.java b/src/main/scala/mrtjp/mcframes/api/package-info.java index dc4588f..c8aac99 100644 --- a/src/main/scala/mrtjp/mcframes/api/package-info.java +++ b/src/main/scala/mrtjp/mcframes/api/package-info.java @@ -2,5 +2,27 @@ * Copyright (c) 2015. Created by MrTJP. All rights reserved. */ -// @API(owner = "MCFrames", provides = "MCFrames|API", apiVersion = "GRADLETOKEN_VERSION") +// spotless:off +// +// You may wonder, "why is this commented out?" +// When FML sorts the modcontainers, it includes APIs. The API's dependency is always its owner but if an API is found +// embedded in a mod which isn't the owner, that mod is set as the API's dependant. In this case, the same jar contains +// both ForgeRelocation and MCFrames, each with an API. So when FML determins which APIs are embedded where, it sees +// MCFrames|API embedded in ForgeRelocation and ForgeRelocation|API embedded in MCFrames. This results in the following +// circular load order: +// +// MCFrames --------------> MCFrames|API <----+ +// ^ ^ | | +// | | | | +// | +-------------------+ | +- MrTJPCore +// | | | | +// | | v | +// ForgeRelocation|API <--- ForgeRelocation <-+ +// +// spotless:on + +// @API(owner = "MCFrames", provides = "MCFrames|API", apiVersion = Tags.VERSION) package mrtjp.mcframes.api; + +// import cpw.mods.fml.common.API; +// import mrtjp.relocation.Tags; diff --git a/src/main/scala/mrtjp/mcframes/frame.scala b/src/main/scala/mrtjp/mcframes/frame.scala index 11f6bac..35480cc 100644 --- a/src/main/scala/mrtjp/mcframes/frame.scala +++ b/src/main/scala/mrtjp/mcframes/frame.scala @@ -190,9 +190,10 @@ object RenderFrame extends ISimpleBlockRenderingHandler { meta: Int ) { TextureUtils.bindAtlas(0) - CCRenderState.reset() - CCRenderState.lightMatrix.locate(w, x, y, z) - CCRenderState.setBrightness(w, x, y, z) + val state = CCRenderState.instance + state.reset() + state.lightMatrix.locate(w, x, y, z) + state.setBrightness(w, x, y, z) if (r.hasOverrideBlockTexture) { getOrGenerateModel(0).render( @@ -204,15 +205,16 @@ object RenderFrame extends ISimpleBlockRenderingHandler { def renderInvBlock(r: RenderBlocks, meta: Int) { TextureUtils.bindAtlas(0) - CCRenderState.reset() - CCRenderState.setDynamic() - CCRenderState.pullLightmap() + val state = CCRenderState.instance + state.reset() + state.setDynamic() + state.pullLightmap() - CCRenderState.startDrawing() + state.startDrawing() RenderFrame.render(new Vector3(-0.5, -0.5, -0.5), 0) - CCRenderState.render() - CCRenderState.draw() + state.render() + state.draw() } def registerIcons(reg: IIconRegister) { diff --git a/src/main/scala/mrtjp/mcframes/handler/mod.scala b/src/main/scala/mrtjp/mcframes/handler/mod.scala index c49f9f9..1b41517 100644 --- a/src/main/scala/mrtjp/mcframes/handler/mod.scala +++ b/src/main/scala/mrtjp/mcframes/handler/mod.scala @@ -14,6 +14,7 @@ import cpw.mods.fml.common.event.{ import mrtjp.core.data.{ModConfig, SpecialConfigGui, TModGuiFactory} import mrtjp.mcframes.api.MCFramesAPI import mrtjp.mcframes.{BlockFrame, BlockMotor, StickRegistry} +import mrtjp.relocation.Tags import net.minecraft.client.gui.GuiScreen @Mod( @@ -31,7 +32,7 @@ object MCFramesMod { final val modID = "MCFrames" final val modName = "MCFrames" - final val version = "GRADLETOKEN_VERSION" + final val version = Tags.VERSION var blockFrame: BlockFrame = _ var blockMotor: BlockMotor = _ diff --git a/src/main/scala/mrtjp/relocation/api/package-info.java b/src/main/scala/mrtjp/relocation/api/package-info.java index 8c6835d..23dfad0 100644 --- a/src/main/scala/mrtjp/relocation/api/package-info.java +++ b/src/main/scala/mrtjp/relocation/api/package-info.java @@ -2,7 +2,8 @@ * Copyright (c) 2015. Created by MrTJP. All rights reserved. */ -@API(owner = "ForgeRelocation", provides = "ForgeRelocation|API", apiVersion = "GRADLETOKEN_VERSION") +@API(owner = "ForgeRelocation", provides = "ForgeRelocation|API", apiVersion = Tags.VERSION) package mrtjp.relocation.api; import cpw.mods.fml.common.API; +import mrtjp.relocation.Tags; diff --git a/src/main/scala/mrtjp/relocation/handler/mod.scala b/src/main/scala/mrtjp/relocation/handler/mod.scala index 54a5d61..c833b1d 100644 --- a/src/main/scala/mrtjp/relocation/handler/mod.scala +++ b/src/main/scala/mrtjp/relocation/handler/mod.scala @@ -14,6 +14,7 @@ import cpw.mods.fml.common.event.{ import mrtjp.core.data.{ModConfig, SpecialConfigGui, TModGuiFactory} import mrtjp.relocation.api._ import mrtjp.relocation.{BlockMovingRow, MovingTileRegistry} +import mrtjp.relocation.Tags import net.minecraft.client.gui.GuiScreen import org.apache.logging.log4j.LogManager @@ -32,7 +33,7 @@ object RelocationMod { final val modID = "ForgeRelocation" final val modName = "ForgeRelocation" - final val version = "GRADLETOKEN_VERSION" + final val version = Tags.VERSION val log = LogManager.getFormatterLogger(modID)