修改第四部分
修复其mod.toml部分内容不能被正确替代问题, 更新了版本号 ForgePlatformHelper shouldDumpModels()方法可能会在初始化环境读取配置出错,若出错则返回false
This commit is contained in:
parent
ffb2dcca4c
commit
d305b932ed
7
README.MD
Normal file
7
README.MD
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# JsonEM (Json Entity Models)
|
||||
Port from [JsonEM](https://github.com/FoundationGames/JsonEM)
|
||||
|
||||
Support Forge Mod Loader (Recommended FML Version is 1.20.1-47.4.1)
|
||||
|
||||
# License
|
||||
MIT
|
||||
31
build.gradle
31
build.gradle
|
|
@ -55,23 +55,24 @@ subprojects {
|
|||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
}
|
||||
def resourceTargets=["fabric.mod.json",'META-INF/mods.toml'];
|
||||
def replaceProperties = [
|
||||
mod_name: mod_name,
|
||||
mod_version: mod_version,
|
||||
mod_source:mod_source,
|
||||
mod_credits:mod_credits,
|
||||
mod_authors: mod_authors,
|
||||
mod_description: mod_description,
|
||||
mod_licence:mod_licence,
|
||||
group:maven_group]
|
||||
processResources{
|
||||
inputs.properties replaceProperties
|
||||
filesMatching(resourceTargets) {
|
||||
expand replaceProperties
|
||||
def resourceTargets=["fabric.mod.json",'META-INF/mods.toml'];
|
||||
def replaceProperties = [
|
||||
mod_name: mod_name,
|
||||
mod_version: mod_version,
|
||||
mod_source:mod_source,
|
||||
mod_credits:mod_credits,
|
||||
mod_authors: mod_authors,
|
||||
mod_description: mod_description,
|
||||
mod_licence:mod_licence,
|
||||
group:maven_group]
|
||||
processResources {
|
||||
inputs.properties replaceProperties
|
||||
filesMatching(resourceTargets) {
|
||||
expand replaceProperties
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configure Maven publishing.
|
||||
publishing {
|
||||
publications {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ import java.nio.file.Path;
|
|||
public class ForgePlatformHelper implements IPlatFormHelper {
|
||||
@Override
|
||||
public boolean shouldDumpModels() {
|
||||
return JsonEmConfig.INSTANCE.DUMP_MODELS.get();
|
||||
try {
|
||||
return JsonEmConfig.INSTANCE.DUMP_MODELS.get();
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ credits = "${mod_credits}"
|
|||
authors = "${mod_authors}"
|
||||
description = '''
|
||||
${mod_description}
|
||||
'''
|
||||
'''
|
||||
|
||||
|
||||
[[dependencies.jsonem]]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ org.gradle.parallel=true
|
|||
# Mod properties
|
||||
mod_id=jsonem
|
||||
mod_name=jsonEM
|
||||
mod_version=1.0-SNAPSHOT
|
||||
mod_version=0.2.1+1.20-fabrge
|
||||
mod_source=https://github.com/LeisureTimeDock/JsonEM_Neo_Forge
|
||||
mod_credits=
|
||||
mod_authors= FoundationGames, R3944Realms
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user