-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
10 changed files
with
165 additions
and
2 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
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,78 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.1.2" | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
neoForge() | ||
} | ||
|
||
configurations { | ||
common | ||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentNeoForge.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}" | ||
|
||
modApi "me.shedaniel.cloth:cloth-config-neoforge:${project.cloth_config_version}" | ||
|
||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false } | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version, | ||
"minecraft_version_range": minecraft_version_range | ||
} | ||
} | ||
|
||
shadowJar { | ||
exclude "fabric.mod.json" | ||
exclude "architectury.common.json" | ||
|
||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier.set("dev-shadow") | ||
} | ||
|
||
remapJar { | ||
inputFile.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier.set("neoforge") | ||
} | ||
|
||
jar { | ||
archiveClassifier.set("dev") | ||
} | ||
|
||
sourcesJar { | ||
def commonSources = project(":common").sourcesJar | ||
dependsOn commonSources | ||
from commonSources.archiveFile.map { zipTree(it) } | ||
} | ||
|
||
components.java { | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenNeoForge(MavenPublication) { | ||
artifactId = rootProject.archives_base_name + "-neoforge" | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
} |
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=neoforge |
15 changes: 15 additions & 0 deletions
15
neoforge/src/main/java/dev/norbiros/emojitype/neoforge/ConfigDirPlatformImpl.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,15 @@ | ||
package dev.norbiros.emojitype.neoforge; | ||
|
||
import dev.norbiros.emojitype.ConfigDirPlatform; | ||
import net.neoforged.fml.loading.FMLPaths; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class ConfigDirPlatformImpl { | ||
/** | ||
* This is our actual method to {@link ConfigDirPlatform#getConfigDirectory()}. | ||
*/ | ||
public static Path getConfigDirectory() { | ||
return FMLPaths.CONFIGDIR.get(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
neoforge/src/main/java/dev/norbiros/emojitype/neoforge/EmojitypeNeoforge.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,16 @@ | ||
package dev.norbiros.emojitype.neoforge; | ||
|
||
import dev.norbiros.emojitype.EmojiType; | ||
import dev.norbiros.emojitype.config.EmojiTypeConfig; | ||
import net.neoforged.neoforge.client.ConfigScreenHandler; | ||
import net.neoforged.fml.ModLoadingContext; | ||
import net.neoforged.fml.common.Mod; | ||
|
||
@Mod(EmojiType.MOD_ID) | ||
public class EmojitypeNeoforge { | ||
public EmojitypeNeoforge() { | ||
EmojiType.init(); | ||
|
||
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> EmojiTypeConfig.createConfigScreen(parent))); | ||
} | ||
} |
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,34 @@ | ||
modLoader = "javafml" | ||
loaderVersion = "[1,)" | ||
license = "GPL-3.0" | ||
issueTrackerURL = "https://github.com/Norbiros/emojitype/issues" | ||
displayURL = "https://modrinth.com/mod/emoji-type" | ||
#updateJSONURL="https://api.modrinth.com/updates/emoji-type/forge_updates.json" | ||
logoFile = "logo.png" | ||
authors = "Cyborgcabbage,Norbiros" | ||
|
||
[[mods]] | ||
modId = "emojitype" | ||
version = "${version}" | ||
displayName = "Emoji Type" | ||
description=''' | ||
A mod that lets you type minecraft emojis easier! | ||
''' | ||
credits="Thanks to cyborgcabbage for original mod!" | ||
|
||
[[mixins]] | ||
config = "emojitype-common.mixins.json" | ||
|
||
[[dependencies.emojitype]] | ||
modId="neoforge" | ||
mandatory=true | ||
versionRange="[20.2,)" | ||
ordering="NONE" | ||
side="BOTH" | ||
|
||
[[dependencies.emojitype]] | ||
modId = "cloth_config" | ||
mandatory = false | ||
versionRange = "[11.0.0,)" | ||
ordering = "NONE" | ||
side = "BOTH" |
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,7 @@ | ||
{ | ||
"pack": { | ||
"description": "emojitype resources", | ||
"pack_format": 15, | ||
"forge:server_data_pack_format": 12 | ||
} | ||
} |
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