Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
covers1624 committed Oct 20, 2024
1 parent 5a4c69e commit f2284e9
Show file tree
Hide file tree
Showing 47 changed files with 311 additions and 517 deletions.
73 changes: 34 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'net.neoforged.gradle' version '[6.0.18,6.2)'
id 'net.neoforged.gradle.userdev' version '7.0.97'
}

group = "io.codechicken"
archivesBaseName = "Translocators"
base {
archivesName = "Translocators"
}

java {
toolchain {
Expand All @@ -22,27 +24,23 @@ sourceSets.main.resources.srcDirs += "src/main/generated"

mod_version = "${mod_version}." + (System.getenv("BUILD_NUMBER") ?: "1")
version = "${mc_version}-${mod_version}"
println "Starting build of ${archivesBaseName}, Version: ${mod_version}"
println "Starting build of ${base.archivesName.get()}, Version: ${mod_version}"
println "Using Forge: ${forge_version}, for Minecraft: ${mc_version}"

minecraft {
mappings channel: 'official', version: mc_version
accessTransformer = file("src/main/resources/META-INF/accesstransformer.cfg")
runs {
client {
workingDirectory file('run')
mods { translocators { source sourceSets.main } }
}
server {
workingDirectory file('run')
mods { translocators { source sourceSets.main } }
}
data {
workingDirectory file('run')
jvmArgs.add("-XstartOnFirstThread")
args '--mod', 'translocators', '--all', '--output', file("src/main/generated"), '--existing', file("src/main/resources")
mods { translocators { source sourceSets.main } }
}
accessTransformers.file file("src/main/resources/META-INF/accesstransformer.cfg")
}

runs {
client {
workingDirectory file('run')
}
server {
workingDirectory file('run')
}
data {
workingDirectory file('run')
programArguments.addAll '--mod', 'translocators', '--all', '--output', file("src/main/generated"), '--existing', file("src/main/resources")
}
}

Expand All @@ -52,12 +50,12 @@ repositories {
}

dependencies {
minecraft "net.neoforged:forge:${mc_version}-${forge_version}"
implementation fg.deobf("io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}:universal")
implementation fg.deobf("io.codechicken:CBMultipart:${mc_version}-${cbmp_version}:universal")
implementation "net.neoforged:neoforge:${forge_version}"
implementation"io.codechicken:CodeChickenLib:${mc_version}-${ccl_version}"
implementation"io.codechicken:CBMultipart:${mc_version}-${cbmp_version}"
}

def publishingMetadata = project.layout.buildDirectory.file("libs/$archivesBaseName-$version-publishing.json")
def publishingMetadata = project.layout.buildDirectory.file("libs/${base.archivesName.get()}-$version-publishing.json")
def publishingMetadataTask = tasks.register("publishingMetadata") {
outputs.file(publishingMetadata)
doFirst {
Expand All @@ -66,7 +64,7 @@ def publishingMetadataTask = tasks.register("publishingMetadata") {
'displayName' : "Translocators ${version}",
'mcVersion' : "${mc_version}",
'version' : "${mod_version}",
'classifier' : 'universal',
'classifier' : null,
'modLoader' : 'neoforge',
'curseforgeId': '247695',
'modrinthId' : 'WIxTuRkQ',
Expand Down Expand Up @@ -108,13 +106,11 @@ processResources { task ->
}

jar {
finalizedBy 'reobfJar'
archiveClassifier = 'universal'
manifest {
attributes 'Specification-Title': archivesBaseName
attributes 'Specification-Title': base.archivesName.get()
attributes 'Specification-Vendor': 'covers1624'
attributes 'Specification-Version': "1"
attributes 'Implementation-Title': archivesBaseName
attributes 'Implementation-Title': base.archivesName.get()
attributes 'Implementation-Vendor': 'covers1624'
attributes 'Implementation-Version': version
attributes 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
Expand All @@ -124,7 +120,6 @@ jar {

tasks.register("signJar") {
dependsOn("jar")
dependsOn("reobfJar")

doFirst {
def args = [:]
Expand Down Expand Up @@ -170,7 +165,7 @@ publishing {
publications {
Translocators(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
artifactId project.base.archivesName.get()
version project.version
artifact jar
artifact sourcesJar
Expand All @@ -181,23 +176,23 @@ publishing {
}

pom {
name = archivesBaseName
description = archivesBaseName
url = "https://github.com/TheCBProject/${archivesBaseName}"
name = base.archivesName.get()
description = base.archivesName.get()
url = "https://github.com/TheCBProject/${base.archivesName.get()}"
scm {
url = "https://github.com/TheCBProject/${archivesBaseName}"
connection = "scm:git:git://github.com/TheCBProject/${archivesBaseName}.git"
connection = "scm:git:[email protected]:TheCBProject/${archivesBaseName}.git"
url = "https://github.com/TheCBProject/${base.archivesName.get()}"
connection = "scm:git:git://github.com/TheCBProject/${base.archivesName.get()}.git"
connection = "scm:git:[email protected]:TheCBProject/${base.archivesName.get()}.git"
}

issueManagement {
system = 'github'
url = "https://github.com/TheCBProject/${archivesBaseName}/issues"
url = "https://github.com/TheCBProject/${base.archivesName.get()}/issues"
}
licenses {
license {
name = "MIT"
url = "https://raw.githubusercontent.com/TheCBProject/${archivesBaseName}/master/LICENSE.txt"
url = "https://raw.githubusercontent.com/TheCBProject/${base.archivesName.get()}/master/LICENSE.txt"
distribution = 'repo'
}
}
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mc_version=1.20.1
forge_version=47.1.65
ccl_version=4.4.0.+
mc_version=1.20.4
forge_version=20.4.237
ccl_version=4.5.0.+
ccl_version_max=5.0.0
mod_version=2.6.0
cbmp_version=3.3.0.+
mod_version=2.7.0
cbmp_version=3.4.0.+
cbmp_version_max=4.0.0
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,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# 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"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
4 changes: 4 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ pluginManagement {
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}

rootProject.name = 'Translocators'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// 1.20.4 2024-09-23T12:56:44.961332023 translocators Recipes.
b86470478db7aa35494ea40f2fe420003555cf16 data/minecraft/recipes/diamond.json
6904d2eed5f0e1469ce69b43adb15c52407ae1fa data/translocators/recipes/diamond_nugget.json
7a9427757b6ee11b237438bb0bccfcdd1f9d4660 data/translocators/recipes/fluid_translocator.json
4fc343ddcd448bc38629bfdeafa0a8b1f4846b8c data/translocators/recipes/item_translocator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// 1.20.4 2024-09-23T12:56:44.960306364 translocators Item models.
da255926859262bfe389edf0508370a46f27b10b assets/translocators/models/item/diamond_nugget.json
bf3ca3ac3b818476d9758b2d31f8a54aa5e73cd9 assets/translocators/models/item/fluid_translocator.json
4f201565e027550b795bb556d73c00a7cec99da0 assets/translocators/models/item/item_translocator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// 1.20.4 2024-09-23T12:56:44.961438784 Tags for minecraft:block mod id translocators
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// 1.20.4 2024-09-23T12:56:44.961106271 Tags for minecraft:item mod id translocators
066595d5295e47124940b94a294b3e09c7fc1844 data/forge/tags/items/nuggets.json
066595d5295e47124940b94a294b3e09c7fc1844 data/forge/tags/items/nuggets/diamond.json
31730a223d67604c9b5e88893621ed3113ca3e6a data/translocators/tags/items/regulate.json
16 changes: 0 additions & 16 deletions src/main/generated/.cache/cache

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// 1.20.4 2024-09-23T12:56:44.961227232 Block States: translocators
ba04de053f1f9b61db84a6b3395823abb1a1cd09 assets/translocators/blockstates/crafting_grid.json
f142b327b9d3b70140ba25dd6eeed2cdb27d7952 assets/translocators/models/block/dummy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "translocators:blocks/crafting_grid"
"particle": "translocators:block/crafting_grid"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"parent": "minecraft:item/generated"
"parent": "minecraft:item/generated",
"class": "codechicken.translocators.client.render.RenderTranslocatorItem$Fluid",
"loader": "codechickenlib:class"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"parent": "minecraft:item/generated"
"parent": "minecraft:item/generated",
"class": "codechicken.translocators.client.render.RenderTranslocatorItem$Item",
"loader": "codechickenlib:class"
}
1 change: 0 additions & 1 deletion src/main/generated/data/forge/tags/items/nuggets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"replace": false,
"values": [
"translocators:diamond_nugget"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"replace": false,
"values": [
"translocators:diamond_nugget"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "translocators:diamond_nugget"
Expand Down

This file was deleted.

Loading

0 comments on commit f2284e9

Please sign in to comment.