-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
599a2f4
commit 987e158
Showing
12 changed files
with
164 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
@@ -91,3 +91,32 @@ jobs: | |
chisel-reborn(required) | ||
game-version-filter: releases # Defaults to selecting the latest compatible version of Minecraft, using the tag from the fabric.mod.json | ||
|
||
|
||
- name: Upload forge artifacts | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: ht0eTMEs | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
modrinth-featured: true | ||
|
||
curseforge-id: 640001 | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} | ||
|
||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
name: '[${{ steps.versions.outputs.minecraft-version }}] Forge ${{ steps.versions.outputs.mod-version }}' | ||
version: 'forge-${{ steps.versions.outputs.minecraft-version }}-${{ steps.versions.outputs.mod-version }}' | ||
|
||
files: | | ||
forge/build/libs/!(*-@(sources|dev|dev-shadow|javadoc).jar) | ||
version-type: release | ||
|
||
loaders: forge | ||
|
||
dependencies: | | ||
architectury-api(required) | ||
chisel-reborn(required) | ||
game-version-filter: releases # Defaults to selecting the latest compatible version of Minecraft, using the tag from the fabric.mod.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
plugins { | ||
id 'com.github.johnrengelman.shadow' | ||
} | ||
|
||
loom { | ||
forge { | ||
} | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
forge() | ||
} | ||
|
||
configurations { | ||
common { | ||
canBeResolved = true | ||
canBeConsumed = false | ||
} | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentForge.extendsFrom common | ||
|
||
// Files in this configuration will be bundled into your mod using the Shadow plugin. | ||
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. | ||
shadowBundle { | ||
canBeResolved = true | ||
canBeConsumed = false | ||
} | ||
} | ||
|
||
dependencies { | ||
forge "net.minecraftforge:forge:$rootProject.forge_version" | ||
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}" | ||
|
||
common(project(path: ':common', configuration: 'namedElements')) { transitive false } | ||
shadowBundle project(path: ':common', configuration: 'transformProductionForge') | ||
} | ||
|
||
processResources { | ||
inputs.property 'version', project.version | ||
|
||
filesMatching('META-INF/mods.toml') { | ||
expand version: project.version | ||
} | ||
} | ||
|
||
shadowJar { | ||
configurations = [project.configurations.shadowBundle] | ||
archiveClassifier = 'dev-shadow' | ||
} | ||
|
||
remapJar { | ||
inputFile.set shadowJar.archiveFile | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loom.platform=forge |
26 changes: 26 additions & 0 deletions
26
forge/src/main/java/com/periut/factoryblocks/forge/FactoryBlocksForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.periut.factoryblocks.forge; | ||
|
||
import com.periut.factoryblocks.FactoryBlocksMod; | ||
import dev.architectury.platform.forge.EventBuses; | ||
import net.minecraftforge.common.MinecraftForge; | ||
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; | ||
|
||
@Mod(FactoryBlocksMod.MODID) | ||
public class FactoryBlocksForge { | ||
public FactoryBlocksForge() { | ||
// Submit our event bus to let architectury register our content on the right time | ||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); | ||
EventBuses.registerModEventBus(FactoryBlocksMod.MODID, FMLJavaModLoadingContext.get().getModEventBus()); | ||
FactoryBlocksMod.init(); | ||
modEventBus.addListener(this::commonSetup); | ||
MinecraftForge.EVENT_BUS.register(this); | ||
} | ||
|
||
private void commonSetup(final FMLCommonSetupEvent event) { | ||
FactoryBlocksMod.post(ModList.get().isLoaded("chisel")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
modLoader = "javafml" | ||
loaderVersion = "[47,)" | ||
issueTrackerURL = "https://github.com/matthewperiut/factory_blocks/issues" | ||
license = "MIT" | ||
|
||
[[mods]] | ||
modId = "factory_blocks" | ||
version = "${version}" | ||
displayName = "Factory Blocks" | ||
authors = "slaincow" | ||
description = ''' | ||
Adds Factory Blocks to Chisel Reborn or Chipped | ||
''' | ||
logoFile = "assets/factory_blocks/icon.png" | ||
|
||
[[dependencies.factory_blocks]] | ||
modId = "forge" | ||
mandatory = true | ||
versionRange = "[0,)" | ||
ordering = "NONE" | ||
side = "BOTH" | ||
|
||
[[dependencies.factory_blocks]] | ||
modId = "minecraft" | ||
mandatory = true | ||
versionRange = "[1.20.3,1.20.4]" | ||
ordering = "NONE" | ||
side = "BOTH" | ||
|
||
[[dependencies.factory_blocks]] | ||
modId = "architectury" | ||
mandatory = true | ||
versionRange = "[0,)" | ||
ordering = "AFTER" | ||
side = "BOTH" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"pack": { | ||
"description": "Example Mod", | ||
"pack_format": 15 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters