Init
This commit is contained in:
commit
a0d9841112
119
.gitignore
vendored
Normal file
119
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
# User-specific stuff
|
||||
.idea/
|
||||
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
.gradle
|
||||
build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
**/build/
|
||||
|
||||
# Common working directory
|
||||
run/
|
||||
runs/
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
21
LICENSE.txt
Normal file
21
LICENSE.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2025 FoundationGames, R3944Realms
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
71
build.gradle
Normal file
71
build.gradle
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
plugins {
|
||||
id 'dev.architectury.loom' version '1.10-SNAPSHOT' apply false
|
||||
id 'architectury-plugin' version '3.4-SNAPSHOT'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
|
||||
}
|
||||
|
||||
architectury {
|
||||
minecraft = project.minecraft_version
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = rootProject.maven_group
|
||||
version = rootProject.mod_version
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'dev.architectury.loom'
|
||||
apply plugin: 'architectury-plugin'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
base {
|
||||
// Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
|
||||
archivesName = "$rootProject.archives_name-$project.name"
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Add repositories to retrieve artifacts from in here.
|
||||
// You should only use this when depending on other mods because
|
||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||
// for more information about repositories.
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
|
||||
mappings loom.officialMojangMappings()
|
||||
}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
// Configure Maven publishing.
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = base.archivesName.get()
|
||||
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.
|
||||
// Notice: This block does NOT have the same function as the block in the top level.
|
||||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
}
|
||||
}
|
||||
}
|
||||
12
common/build.gradle
Normal file
12
common/build.gradle
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
architectury {
|
||||
common rootProject.enabled_platforms.split(',')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// We depend on Fabric Loader here to use the Fabric @Environment annotations,
|
||||
// which get remapped to the correct annotations on each platform.
|
||||
// Do NOT use other classes from Fabric Loader.
|
||||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
|
||||
modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.leisuretimedock.jsonem;
|
||||
|
||||
public final class Jsonem {
|
||||
public static final String MOD_ID = "jsonem";
|
||||
|
||||
public static void init() {
|
||||
// Write common init code here.
|
||||
}
|
||||
}
|
||||
13
common/src/main/resources/jsonem.mixins.json
Normal file
13
common/src/main/resources/jsonem.mixins.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"required": true,
|
||||
"package": "com.leisuretimedock.jsonem.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"minVersion": "0.8",
|
||||
"client": [
|
||||
],
|
||||
"mixins": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
53
fabric/build.gradle
Normal file
53
fabric/build.gradle
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
}
|
||||
|
||||
configurations {
|
||||
common {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentFabric.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 {
|
||||
modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version"
|
||||
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version"
|
||||
|
||||
modImplementation "dev.architectury:architectury-fabric:$rootProject.architectury_api_version"
|
||||
|
||||
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||
shadowBundle project(path: ':common', configuration: 'transformProductionFabric')
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property 'version', project.version
|
||||
|
||||
filesMatching('fabric.mod.json') {
|
||||
expand version: project.version
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = 'dev-shadow'
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.leisuretimedock.jsonem.fabric;
|
||||
|
||||
import com.leisuretimedock.jsonem.Jsonem;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
public final class JsonemFabric implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||
// However, some things (like resources) may still be uninitialized.
|
||||
// Proceed with mild caution.
|
||||
|
||||
// Run our common setup.
|
||||
Jsonem.init();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.leisuretimedock.jsonem.fabric.client;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
|
||||
public final class JsonemFabricClient implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
|
||||
}
|
||||
}
|
||||
38
fabric/src/main/resources/fabric.mod.json
Normal file
38
fabric/src/main/resources/fabric.mod.json
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "jsonem",
|
||||
"version": "${version}",
|
||||
"name": "JsonEM_Neo_Forge_1_20_1",
|
||||
"description": "Migrate from Fabric 1.20.1",
|
||||
"authors": [
|
||||
"FoundationGames",
|
||||
"R3944Realms"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": ""
|
||||
},
|
||||
"license": "MIT",
|
||||
"icon": "assets/jsonem/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.leisuretimedock.jsonem.fabric.JsonemFabric"
|
||||
],
|
||||
"client": [
|
||||
"com.leisuretimedock.jsonem.fabric.client.JsonemFabricClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"jsonem.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.16.14",
|
||||
"minecraft": "~1.20.1",
|
||||
"java": ">=17",
|
||||
"architectury": ">=9.2.14",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
"suggests": {
|
||||
"another-mod": "*"
|
||||
}
|
||||
}
|
||||
57
forge/build.gradle
Normal file
57
forge/build.gradle
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
plugins {
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
}
|
||||
|
||||
loom {
|
||||
forge {
|
||||
mixinConfig "jsonem.mixins.json"
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
modImplementation "dev.architectury:architectury-forge:$rootProject.architectury_api_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 {
|
||||
input.set shadowJar.archiveFile
|
||||
}
|
||||
1
forge/gradle.properties
Normal file
1
forge/gradle.properties
Normal file
|
|
@ -0,0 +1 @@
|
|||
loom.platform=forge
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.leisuretimedock.jsonem.forge;
|
||||
|
||||
import com.leisuretimedock.jsonem.Jsonem;
|
||||
import dev.architectury.platform.forge.EventBuses;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
|
||||
@Mod(Jsonem.MOD_ID)
|
||||
public final class JsonemForge {
|
||||
@SuppressWarnings("removal")
|
||||
public JsonemForge() {
|
||||
// Submit our event bus to let Architectury API register our content on the right time.
|
||||
EventBuses.registerModEventBus(Jsonem.MOD_ID, FMLJavaModLoadingContext.get().getModEventBus());
|
||||
|
||||
// Run our common setup.
|
||||
Jsonem.init();
|
||||
}
|
||||
}
|
||||
35
forge/src/main/resources/META-INF/mods.toml
Normal file
35
forge/src/main/resources/META-INF/mods.toml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
modLoader = "javafml"
|
||||
loaderVersion = "[47,)"
|
||||
#issueTrackerURL = ""
|
||||
license = "MIT"
|
||||
|
||||
[[mods]]
|
||||
modId = "jsonem"
|
||||
version = "${version}"
|
||||
displayName = "JsonEM_Neo_Forge_1_20_1"
|
||||
authors = "FoundationGames, R3944Realms"
|
||||
description = '''
|
||||
Migrate from Fabric 1.20.1
|
||||
'''
|
||||
#logoFile = ""
|
||||
|
||||
[[dependencies.jsonem]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[47,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.jsonem]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.20.1,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.jsonem]]
|
||||
modId = "architectury"
|
||||
mandatory = true
|
||||
versionRange = "[9.2.14,)"
|
||||
ordering = "AFTER"
|
||||
side = "BOTH"
|
||||
6
forge/src/main/resources/pack.mcmeta
Normal file
6
forge/src/main/resources/pack.mcmeta
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"description": "jsonem resources",
|
||||
"pack_format": 15
|
||||
}
|
||||
}
|
||||
15
gradle.properties
Normal file
15
gradle.properties
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Done to increase the memory available to Gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.parallel=true
|
||||
# Mod properties
|
||||
mod_version=1.0-SNAPSHOT
|
||||
maven_group=com.leisuretimedock
|
||||
archives_name=jsonem_neo_forge_1_20_1
|
||||
enabled_platforms=fabric,neoforge
|
||||
# Minecraft properties
|
||||
minecraft_version=1.20.1
|
||||
# Dependencies
|
||||
architectury_api_version=9.2.14
|
||||
fabric_loader_version=0.16.14
|
||||
fabric_api_version=0.92.5+1.20.1
|
||||
forge_version=1.20.1-47.4.1
|
||||
1
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
1
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.12.1-bin.zip
|
||||
14
settings.gradle
Normal file
14
settings.gradle
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://maven.architectury.dev/" }
|
||||
maven { url "https://files.minecraftforge.net/maven/" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'jsonem'
|
||||
|
||||
include 'common'
|
||||
include 'fabric'
|
||||
include 'forge'
|
||||
Loading…
Reference in New Issue
Block a user