Skip to content

Commit

Permalink
Initial update to 1.20 [build] [publish]
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Jun 15, 2023
1 parent 5bd4be4 commit 8b5b434
Show file tree
Hide file tree
Showing 167 changed files with 624 additions and 488 deletions.
58 changes: 41 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'com.modrinth.minotaur' version "2.+"
}

version = "${version}"
group = 'com.shynieke.statues' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Statues-${mc_version}"
group = "${mod_group}"
base {
archivesName = "Statues-${mc_version}"
}

// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: "${mcp_channel}", version: "${mcp_mappings}"
mappings channel: mapping_channel, version: mapping_version

copyIdeResources = true

accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

Expand All @@ -25,49 +31,61 @@ minecraft {
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

// Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', "${mod_id}"

mods {
statues {
"${mod_id}" {
source sourceSets.main
}
}
}

server {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

// Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
property 'forge.enabledGameTestNamespaces', "${mod_id}"

mods {
statues {
"${mod_id}" {
source sourceSets.main
}
}
}

data {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"

// Recommended logging data for a userdev environment
// property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
property 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

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

mods {
statues {
"${mod_id}" {
source sourceSets.main
}
}
Expand Down Expand Up @@ -104,30 +122,36 @@ dependencies {

// implementation fg.deobf("com.blamejared.crafttweaker:CraftTweaker-forge-${mc_version}:${crafttweaker_version}")

implementation fg.deobf("top.theillusivec4.curios:curios-forge:${mc_version}-${curios_version}")
implementation fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}")

implementation fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}-FORGE")
implementation fg.deobf("xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}")
// implementation fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}-FORGE")
// implementation fg.deobf("xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}")

implementation fg.deobf("curse.maven:jade-324717:4573063") //Jade (WAILA)
implementation fg.deobf("curse.maven:TheOneProbe-245211:4442439") //The One probe (TOP)
implementation fg.deobf("curse.maven:jade-324717:4586193") //Jade (WAILA)
implementation fg.deobf("curse.maven:TheOneProbe-245211:4579432") //The One probe (TOP)
}

// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title" : "statues",
"Specification-Title" : "${mod_id}",
"Specification-Vendor" : "ShyNieke",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "ShyNieke",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')

def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
Expand All @@ -138,7 +162,7 @@ publishing {
mavenJava(MavenPublication) {
artifact(reobfArtifact) {
builtBy reobfArtifact
artifactId = archivesBaseName
artifactId = base.archivesName.get()
classifier null
}
}
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* Initial update to 1.19.4
* Initial update to 1.20
16 changes: 9 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

# Base info
mc_version=1.19.4
forge_version=45.1.0
mcp_channel=official
mcp_mappings=1.19.4
mc_version=1.20.1
forge_version=47.0.1
mapping_channel=official
mapping_version=1.20.1
mod_group=com.shynieke.statues
mod_id=statues

#Publishing
mod_name=Statues
curseforge_id=253172
modrinth_id=hsCeX7k7

# Version
version=0.3.5
version=0.3.6

# Dependencies
jei_version=13.1.0.11
jei_version=15.0.0.12
crafttweaker_version=10.0.21
curios_version=5.1.5.3
curios_version=5.2.0-beta.3+1.20.1
patchouli_version=1.19.4-79
patchouli_provider_version=1.19.4-1.0.9-Snapshot.4

Expand Down
1 change: 1 addition & 0 deletions gradle/curseforge.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if (System.getenv().CURSEFORGE_KEY) {
id = project.curseforge_id
releaseType = "beta"
addGameVersion "Forge"
addGameVersion "1.20"
addGameVersion "${mc_version}"
addGameVersion "Java 17"
mainArtifact(jar)
Expand Down
2 changes: 1 addition & 1 deletion gradle/modrinth.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (System.getenv().MODRINTH_KEY) {
versionNumber = project.version
uploadFile = jar
changelog = fileContents
gameVersions = ["${mc_version}"]
gameVersions = ["1.20", "${mc_version}"]
loaders = ["forge"]

dependencies {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
9 changes: 8 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.minecraftforge.net/' }
maven {
name = 'MinecraftForge'
url = 'https://maven.minecraftforge.net/'
}
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.19.4 2023-06-15T20:10:58.3743504 Registries
// 1.20.1 2023-06-15T20:40:21.1760633 Registries
92b52d0f668e65b9a388a48409ce8b97295d4c3c data/statues/forge/biome_modifier/add_fewer_statue_bat_spawn.json
3064d9ca771b5ff2469f323ca2c54b1697a48798 data/statues/forge/biome_modifier/add_statue_bat_spawn.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// 1.19.4 2023-06-15T20:10:58.3718515 Tags for minecraft:worldgen/biome mod id statues
// 1.20.1 2023-06-15T20:40:21.173063 Tags for minecraft:worldgen/biome mod id statues
04ac0a28392a7ff31602fa82ebe378e64220b060 data/statues/tags/worldgen/biome/can_spawn_fewer_statue_bat.json
cfbf1b5c1a6e2d1efdb53ee37b090d5ea9e53a17 data/statues/tags/worldgen/biome/can_spawn_statue_bat.json
57b9bc73504d77a105ed8da0e7b56fcdf9c2c74c data/statues/tags/worldgen/biome/can_spawn_statue_bat.json
Loading

0 comments on commit 8b5b434

Please sign in to comment.