Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.19.2 port #22

Open
wants to merge 3 commits into
base: 1.19.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ build
# other
eclipse
run
.DS_Store
131 changes: 53 additions & 78 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
buildscript {
repositories {
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.ajoberstar:gradle-git:0.10.1'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.

plugins {
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
}
apply plugin: 'net.minecraftforge.gradle'

apply plugin: 'org.spongepowered.mixin'

version = "${mc_version}-${mod_version}"
group = package_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand All @@ -39,95 +38,63 @@ minecraft {
//
// Use non-default mappings at your own risk. They may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'official', version: '1.18.2'

accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
mappings channel: 'official', version: '1.19.2'

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', 'magicfeather'

jvmArgs '-Xms1G', '-Xmx4G'
property 'fml.earlyprogresswindow', 'false'
if (file("src/main/resources/${mod_name}.mixins.json").exists()) {
arg "-mixin.config=${mod_name}.mixins.json"
}
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client'
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
magicfeather {
modClientRun {
source sourceSets.main
}
}
}

server {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', 'magicfeather'

mods {
magicfeather {
source sourceSets.main
}
jvmArgs '-Xms1G', '-Xmx4G'
arg 'nogui'
if (file("src/main/resources/${mod_name}.mixins.json").exists()) {
arg "-mixin.config=${mod_name}.mixins.json"
}
}

// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', 'magicfeather'

ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Server'
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
magicfeather {
modServerRun {
source sourceSets.main
}
}
}

data {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'magicfeather', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

jvmArgs '-Xms1G', '-Xmx4G'
if (file("src/main/resources/${mod_name}.mixins.json").exists()) {
arg "-mixin.config=${mod_name}.mixins.json"
}
args '--mod', mod_name, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Data'
property 'terminal.ansi', 'true'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'mixin.debug.export', 'true'
mods {
magicfeather {
modDataRun {
source sourceSets.main
}
}
Expand Down Expand Up @@ -157,15 +124,23 @@ repositories {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.18.2-40.1.0'
minecraft 'net.minecraftforge:forge:1.19.2-43.2.4'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'

// https://github.com/Ephys/CookieCore/packages/102415
// You'll need to authenticate to Github Packages
// See https://docs.github.com/en/packages/guides/configuring-gradle-for-use-with-github-packages#authenticating-to-github-packages
implementation fg.deobf('be.ephys.cookiecore:cookiecore:1.18.2-4.0.0-c56fd52')
// implementation fg.deobf('be.ephys.cookiecore:cookiecore:1.18.2-4.0.0-c56fd52')

compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.18.2-5.0.7.1:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.18.2-5.0.7.1")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.2.2:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.2.2")
}

mixin {
if (file("src/main/resources/${mod_name}.mixins.json").exists()) {
add sourceSets.main, "${mod_name}.refmap.json"
config "${mod_name}.mixins.json"
}
}

// Example for how to get properties into the manifest for reading at runtime.
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mod_name=magicfeather
package_group=be.ephys.magicfeather
mod_version=4.2.0
mc_version=1.18.2
mod_version=5.0.0
mc_version=1.19.2
7 changes: 7 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
}
}
Loading