diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 08d25a9f4..1546b3c77 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -22,12 +22,12 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - name: Clean gradle - run: ./gradlew clean --no-daemon --max-workers 1 + run: ./gradlew clean - name: Validate no assets run: test ! -d ./src/generated - name: Generate assets - run: ./gradlew runData --no-daemon --max-workers 1 + run: ./gradlew runData - name: Validate assets run: test -d ./src/generated -a -f ./src/generated/resources/.cache/cache - name: Build with Gradle - run: ./gradlew build --no-daemon --max-workers 1 + run: ./gradlew build diff --git a/build.gradle b/build.gradle index d77cb41a4..28be2ab89 100644 --- a/build.gradle +++ b/build.gradle @@ -75,13 +75,6 @@ sourceSets { compileClasspath += sourceSets.main.output runtimeClasspath += sourceSets.main.output } - unported { - compileClasspath += sourceSets.api.output - runtimeClasspath += sourceSets.api.output - - compileClasspath += sourceSets.main.output - runtimeClasspath += sourceSets.main.output - } test { compileClasspath += sourceSets.api.output runtimeClasspath += sourceSets.api.output @@ -91,7 +84,6 @@ sourceSets { configurations { apiCompile.extendsFrom(compileClasspath) datagenCompile.extendsFrom(compileClasspath) - unportedCompile.extendsFrom(compileClasspath) } apply from: 'gradle/scripts/spotless.gradle' @@ -110,7 +102,13 @@ dependencies { modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" - modImplementation "alexiil.mc.lib:libblockattributes-all:0.7.1-pre.4" + modImplementation "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}" + modImplementation "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}" + modImplementation "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}" + include "alexiil.mc.lib:libblockattributes-core:${libblockattributes_version}" + include "alexiil.mc.lib:libblockattributes-items:${libblockattributes_version}" + include "alexiil.mc.lib:libblockattributes-fluids:${libblockattributes_version}" + modImplementation "me.shedaniel:RoughlyEnoughItems:4.6.6" modImplementation "mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75" @@ -136,24 +134,14 @@ processResources { } } - -// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task -// if it is present. -// If you remove this task, sources will not be generated. -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} - -jar { - from "LICENSE" -} - +apply from: 'gradle/scripts/artifacts.gradle' apply from: 'gradle/scripts/curseforge.gradle' publishing { publications { mavenJava(MavenPublication) { + artifactId = 'appliedenergistics2-fabric' + // add all the jars that should be included when publishing to maven artifact(remapJar) { builtBy remapJar diff --git a/gradle.properties b/gradle.properties index fa872d6a5..d9cd8455b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,6 +27,8 @@ archives_base_name = fabric-example-mod kotlin_version=1.3.61 fabric_kotlin_version=1.3.61+build.1 +libblockattributes_version=0.7.1-pre.4 + ######################################################### # Deployment # ######################################################### diff --git a/gradle/scripts/artifacts.gradle b/gradle/scripts/artifacts.gradle index f9503ff9b..52dcf587f 100644 --- a/gradle/scripts/artifacts.gradle +++ b/gradle/scripts/artifacts.gradle @@ -21,8 +21,7 @@ processResources { } jar { - finalizedBy 'reobfJar' - finalizedBy 'signJar' + finalizedBy 'remapJar' from sourceSets.main.output.classesDirs from sourceSets.api.output.classesDirs @@ -57,25 +56,23 @@ task javadocJar(type: Jar, dependsOn: javadocs) { from javadoc.destinationDir } -task sourcesJar(type: Jar) { +// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task +// if it is present. +// If you remove this task, sources will not be generated. +task sourcesJar(type: Jar, dependsOn: classes) { classifier = "sources" - from sourceSets.main.allJava - from sourceSets.api.allJava + from sourceSets.main.allSource + from sourceSets.api.allSource } task apiJar(type: Jar) { classifier = "api" from sourceSets.api.output include "appeng/api/**" - - // TODO: when FG bug is fixed, remove allJava from the api jar. - // https://github.com/MinecraftForge/ForgeGradle/issues/369 - // Gradle should be able to pull them from the -sources jar. - from sourceSets.api.allJava } artifacts { archives javadocJar archives sourcesJar archives apiJar -} \ No newline at end of file +} diff --git a/src/main/java/appeng/client/AppEngClient.java b/src/main/java/appeng/client/AppEngClient.java index 80954a9c5..0e8aed2d3 100644 --- a/src/main/java/appeng/client/AppEngClient.java +++ b/src/main/java/appeng/client/AppEngClient.java @@ -195,7 +195,7 @@ public final class AppEngClient extends AppEngBase { // On the client, we'll register for server startup/shutdown to properly setup // WorldData // each time the integrated server starts&stops - ServerLifecycleEvents.SERVER_STARTED.register(WorldData::onServerStarting); + ServerLifecycleEvents.SERVER_STARTING.register(WorldData::onServerStarting); ServerLifecycleEvents.SERVER_STOPPING.register(server -> WorldData.instance().onServerStopping()); ServerLifecycleEvents.SERVER_STOPPED.register(server -> WorldData.instance().onServerStoppped()); diff --git a/src/main/java/appeng/client/render/cablebus/FacadeBlockAccess.java b/src/main/java/appeng/client/render/cablebus/FacadeBlockAccess.java index 913b6aab6..f39659187 100644 --- a/src/main/java/appeng/client/render/cablebus/FacadeBlockAccess.java +++ b/src/main/java/appeng/client/render/cablebus/FacadeBlockAccess.java @@ -68,12 +68,6 @@ public class FacadeBlockAccess implements BlockRenderView { return world.getFluidState(pos); } - // This is for diffuse lighting - @Override - public float func_230487_a_(Direction p_230487_1_, boolean p_230487_2_) { - return world.func_230487_a_(p_230487_1_, p_230487_2_); - } - @Override public LightingProvider getLightingProvider() { return world.getLightingProvider(); diff --git a/src/main/java/appeng/mixins/DimensionStructuresSettingsMixin.java b/src/main/java/appeng/mixins/DimensionStructuresSettingsMixin.java deleted file mode 100644 index 2790dc139..000000000 --- a/src/main/java/appeng/mixins/DimensionStructuresSettingsMixin.java +++ /dev/null @@ -1,40 +0,0 @@ -package appeng.mixins; - -import com.google.common.collect.ImmutableMap; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Mutable; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import net.minecraft.world.gen.feature.structure.Structure; -import net.minecraft.world.gen.settings.DimensionStructuresSettings; -import net.minecraft.world.gen.settings.StructureSeparationSettings; - -import appeng.worldgen.meteorite.MeteoriteStructure; - -/** - * This Mixin will add the structure placement configuration for the meteorite - * structure to the static final immutable map that contains them. There is - * currently no Forge hook for this, and registering them during the registry - * event is already too late. - *
- * If this is not done, Meteorites spawn every chunk, since that is the default
- * for missing entries.
- */
-@Mixin(DimensionStructuresSettings.class)
-public class DimensionStructuresSettingsMixin {
-
- @Shadow
- @Mutable
- private static ImmutableMap