diff --git a/build.gradle b/build.gradle index 341b6b0e2..438422d9a 100644 --- a/build.gradle +++ b/build.gradle @@ -11,10 +11,10 @@ buildscript { classpath "org.parchmentmc:librarian:${librarian_version}" } } + plugins { id 'com.matthewprenger.cursegradle' version "${cursegradle_version}" } - apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.parchmentmc.librarian.forgegradle' apply plugin: 'eclipse' @@ -24,11 +24,10 @@ apply plugin: 'org.spongepowered.mixin' boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false'); ext.buildNumber = System.getenv('BUILD_NUMBER') -if (buildNumber == null) buildNumber = 'custom' -version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildNumber}" : '') group = 'com.jozufozu.flywheel' -archivesBaseName = 'flywheel-forge' +archivesBaseName = "flywheel-forge-${artifact_minecraft_version}" +version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '') java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -36,7 +35,6 @@ println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getPro minecraft { mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}" - runs { client { workingDirectory project.file('run') @@ -89,10 +87,6 @@ minecraft { } } -mixin { - add sourceSets.main, 'flywheel.refmap.json' -} - repositories { maven { url 'https://www.cursemaven.com' @@ -130,53 +124,64 @@ dependencies { } } -// Example for how to get properties into the manifest for reading by the runtime.. +processResources { + inputs.property 'version', mod_version + + filesMatching('META-INF/mods.toml') { + expand 'version': mod_version + } +} + +mixin { + add sourceSets.main, 'flywheel.refmap.json' +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} + jar { manifest { attributes([ 'Specification-Title' : 'flywheel', //'Specification-Vendor': 'flywheel authors', 'Specification-Version' : '1', // We are version 1 of ourselves - 'Implementation-Title' : project.name, - 'Implementation-Version' : project.version, + 'Implementation-Title' : project.jar.baseName, + 'Implementation-Version' : project.jar.archiveVersion, //'Implementation-Vendor': 'flywheel authors', - 'MixinConfigs' : 'flywheel.mixins.json', - 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), + 'MixinConfigs' : 'flywheel.mixins.json' ]) } } -jar.finalizedBy('reobfJar') - javadoc { source = [sourceSets.main.allJava] // prevent java 8's strict doclint for javadocs from failing builds options.addStringOption('Xdoclint:none', '-quiet') } -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - archiveBaseName.set(project.archivesBaseName) - archiveVersion.set("${project.version}") - archiveClassifier.set('sources') +java { + withSourcesJar() + withJavadocJar() } -task javadocJar(type: Jar, dependsOn: javadoc) { - from javadoc.destinationDir - archiveClassifier.set('javadoc') +void addLicense(jarTask) { + jarTask.from('LICENSE') { + rename { "${it}_${project.archivesBaseName}" } + } } -artifacts { - archives jar, sourcesJar, javadocJar -} +jar.finalizedBy('reobfJar') +addLicense(jar) publishing { - tasks.publish.dependsOn 'build' publications { mavenJava(MavenPublication) { - artifact jar - artifact sourcesJar - artifact javadocJar + artifactId = archivesBaseName + + from components.java + fg.component(it) } } diff --git a/gradle.properties b/gradle.properties index 42e95d776..67b6f3ee8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,8 @@ org.gradle.daemon = false # mod version info mod_version = 0.6.4 -mc_update_version = 1.18 +artifact_minecraft_version = 1.18.2 + minecraft_version = 1.18.2 forge_version = 40.1.60 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2..41d9927a4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 84d1f85fd..aa991fcea 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index c53aefaa5..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/AxisAngle4d.java b/joml/AxisAngle4d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/AxisAngle4d.java rename to joml/AxisAngle4d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/AxisAngle4f.java b/joml/AxisAngle4f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/AxisAngle4f.java rename to joml/AxisAngle4f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/ConfigurationException.java b/joml/ConfigurationException.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/ConfigurationException.java rename to joml/ConfigurationException.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/FrustumIntersection.java b/joml/FrustumIntersection.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/FrustumIntersection.java rename to joml/FrustumIntersection.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/FrustumRayBuilder.java b/joml/FrustumRayBuilder.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/FrustumRayBuilder.java rename to joml/FrustumRayBuilder.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/GeometryUtils.java b/joml/GeometryUtils.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/GeometryUtils.java rename to joml/GeometryUtils.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Interpolationd.java b/joml/Interpolationd.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Interpolationd.java rename to joml/Interpolationd.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Interpolationf.java b/joml/Interpolationf.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Interpolationf.java rename to joml/Interpolationf.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Intersectiond.java b/joml/Intersectiond.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Intersectiond.java rename to joml/Intersectiond.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Intersectionf.java b/joml/Intersectionf.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Intersectionf.java rename to joml/Intersectionf.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Math.java b/joml/Math.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Math.java rename to joml/Math.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2d.java b/joml/Matrix2d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2d.java rename to joml/Matrix2d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2dc.java b/joml/Matrix2dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2dc.java rename to joml/Matrix2dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2f.java b/joml/Matrix2f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2f.java rename to joml/Matrix2f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2fc.java b/joml/Matrix2fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix2fc.java rename to joml/Matrix2fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3d.java b/joml/Matrix3d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3d.java rename to joml/Matrix3d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3dStack.java b/joml/Matrix3dStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3dStack.java rename to joml/Matrix3dStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3dc.java b/joml/Matrix3dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3dc.java rename to joml/Matrix3dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3f.java b/joml/Matrix3f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3f.java rename to joml/Matrix3f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3fStack.java b/joml/Matrix3fStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3fStack.java rename to joml/Matrix3fStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3fc.java b/joml/Matrix3fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3fc.java rename to joml/Matrix3fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2d.java b/joml/Matrix3x2d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2d.java rename to joml/Matrix3x2d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2dStack.java b/joml/Matrix3x2dStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2dStack.java rename to joml/Matrix3x2dStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2dc.java b/joml/Matrix3x2dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2dc.java rename to joml/Matrix3x2dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2f.java b/joml/Matrix3x2f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2f.java rename to joml/Matrix3x2f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2fStack.java b/joml/Matrix3x2fStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2fStack.java rename to joml/Matrix3x2fStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2fc.java b/joml/Matrix3x2fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix3x2fc.java rename to joml/Matrix3x2fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4d.java b/joml/Matrix4d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4d.java rename to joml/Matrix4d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4dStack.java b/joml/Matrix4dStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4dStack.java rename to joml/Matrix4dStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4dc.java b/joml/Matrix4dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4dc.java rename to joml/Matrix4dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4f.java b/joml/Matrix4f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4f.java rename to joml/Matrix4f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4fStack.java b/joml/Matrix4fStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4fStack.java rename to joml/Matrix4fStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4fc.java b/joml/Matrix4fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4fc.java rename to joml/Matrix4fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3d.java b/joml/Matrix4x3d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3d.java rename to joml/Matrix4x3d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3dStack.java b/joml/Matrix4x3dStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3dStack.java rename to joml/Matrix4x3dStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3dc.java b/joml/Matrix4x3dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3dc.java rename to joml/Matrix4x3dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3f.java b/joml/Matrix4x3f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3f.java rename to joml/Matrix4x3f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3fStack.java b/joml/Matrix4x3fStack.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3fStack.java rename to joml/Matrix4x3fStack.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3fc.java b/joml/Matrix4x3fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Matrix4x3fc.java rename to joml/Matrix4x3fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/MemUtil.java b/joml/MemUtil.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/MemUtil.java rename to joml/MemUtil.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Options.java b/joml/Options.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Options.java rename to joml/Options.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/PolygonsIntersection.java b/joml/PolygonsIntersection.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/PolygonsIntersection.java rename to joml/PolygonsIntersection.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Quaterniond.java b/joml/Quaterniond.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Quaterniond.java rename to joml/Quaterniond.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/QuaterniondInterpolator.java b/joml/QuaterniondInterpolator.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/QuaterniondInterpolator.java rename to joml/QuaterniondInterpolator.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Quaterniondc.java b/joml/Quaterniondc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Quaterniondc.java rename to joml/Quaterniondc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Quaternionf.java b/joml/Quaternionf.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Quaternionf.java rename to joml/Quaternionf.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/QuaternionfInterpolator.java b/joml/QuaternionfInterpolator.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/QuaternionfInterpolator.java rename to joml/QuaternionfInterpolator.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Quaternionfc.java b/joml/Quaternionfc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Quaternionfc.java rename to joml/Quaternionfc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Random.java b/joml/Random.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Random.java rename to joml/Random.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/RayAabIntersection.java b/joml/RayAabIntersection.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/RayAabIntersection.java rename to joml/RayAabIntersection.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/RoundingMode.java b/joml/RoundingMode.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/RoundingMode.java rename to joml/RoundingMode.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Runtime.java b/joml/Runtime.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Runtime.java rename to joml/Runtime.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/SimplexNoise.java b/joml/SimplexNoise.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/SimplexNoise.java rename to joml/SimplexNoise.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2d.java b/joml/Vector2d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2d.java rename to joml/Vector2d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2dc.java b/joml/Vector2dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2dc.java rename to joml/Vector2dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2f.java b/joml/Vector2f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2f.java rename to joml/Vector2f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2fc.java b/joml/Vector2fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2fc.java rename to joml/Vector2fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2i.java b/joml/Vector2i.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2i.java rename to joml/Vector2i.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector2ic.java b/joml/Vector2ic.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector2ic.java rename to joml/Vector2ic.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3d.java b/joml/Vector3d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3d.java rename to joml/Vector3d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3dc.java b/joml/Vector3dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3dc.java rename to joml/Vector3dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3f.java b/joml/Vector3f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3f.java rename to joml/Vector3f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3fc.java b/joml/Vector3fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3fc.java rename to joml/Vector3fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3i.java b/joml/Vector3i.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3i.java rename to joml/Vector3i.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector3ic.java b/joml/Vector3ic.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector3ic.java rename to joml/Vector3ic.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4d.java b/joml/Vector4d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4d.java rename to joml/Vector4d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4dc.java b/joml/Vector4dc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4dc.java rename to joml/Vector4dc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4f.java b/joml/Vector4f.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4f.java rename to joml/Vector4f.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4fc.java b/joml/Vector4fc.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4fc.java rename to joml/Vector4fc.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4i.java b/joml/Vector4i.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4i.java rename to joml/Vector4i.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/Vector4ic.java b/joml/Vector4ic.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/Vector4ic.java rename to joml/Vector4ic.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/package.html b/joml/package.html similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/package.html rename to joml/package.html diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/BestCandidateSampling.java b/joml/sampling/BestCandidateSampling.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/BestCandidateSampling.java rename to joml/sampling/BestCandidateSampling.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Callback2d.java b/joml/sampling/Callback2d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Callback2d.java rename to joml/sampling/Callback2d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Callback3d.java b/joml/sampling/Callback3d.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Callback3d.java rename to joml/sampling/Callback3d.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Convolution.java b/joml/sampling/Convolution.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Convolution.java rename to joml/sampling/Convolution.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Math.java b/joml/sampling/Math.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/Math.java rename to joml/sampling/Math.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/PoissonSampling.java b/joml/sampling/PoissonSampling.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/PoissonSampling.java rename to joml/sampling/PoissonSampling.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/SpiralSampling.java b/joml/sampling/SpiralSampling.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/SpiralSampling.java rename to joml/sampling/SpiralSampling.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/StratifiedSampling.java b/joml/sampling/StratifiedSampling.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/StratifiedSampling.java rename to joml/sampling/StratifiedSampling.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/UniformSampling.java b/joml/sampling/UniformSampling.java similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/UniformSampling.java rename to joml/sampling/UniformSampling.java diff --git a/src/main/java/com/jozufozu/flywheel/repack/joml/sampling/package.html b/joml/sampling/package.html similarity index 100% rename from src/main/java/com/jozufozu/flywheel/repack/joml/sampling/package.html rename to joml/sampling/package.html diff --git a/src/main/java/com/jozufozu/flywheel/backend/Backend.java b/src/main/java/com/jozufozu/flywheel/backend/Backend.java index 77528cb30..977ac0162 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/Backend.java +++ b/src/main/java/com/jozufozu/flywheel/backend/Backend.java @@ -7,8 +7,8 @@ import org.slf4j.Logger; import com.jozufozu.flywheel.api.FlywheelWorld; import com.jozufozu.flywheel.backend.gl.versioned.GlCompat; import com.jozufozu.flywheel.backend.instancing.ParallelTaskEngine; -import com.jozufozu.flywheel.config.FlwConfig; import com.jozufozu.flywheel.config.BackendType; +import com.jozufozu.flywheel.config.FlwConfig; import com.jozufozu.flywheel.core.shader.ProgramSpec; import com.mojang.logging.LogUtils; diff --git a/src/main/java/com/jozufozu/flywheel/backend/Loader.java b/src/main/java/com/jozufozu/flywheel/backend/Loader.java index 94c3628cf..203c2660c 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/Loader.java +++ b/src/main/java/com/jozufozu/flywheel/backend/Loader.java @@ -96,10 +96,8 @@ public class Loader implements ResourceManagerReloadListener { Collection programSpecs = manager.listResources(PROGRAM_DIR, s -> s.endsWith(".json")); for (ResourceLocation location : programSpecs) { - try { - Resource file = manager.getResource(location); - - String s = StringUtil.readToString(file.getInputStream()); + try (Resource resource = manager.getResource(location)) { + String s = StringUtil.readToString(resource.getInputStream()); ResourceLocation specName = ResourceUtil.trim(location, PROGRAM_DIR, ".json"); diff --git a/src/main/java/com/jozufozu/flywheel/config/FlwCommands.java b/src/main/java/com/jozufozu/flywheel/config/FlwCommands.java index ce0ea95d7..12b775205 100644 --- a/src/main/java/com/jozufozu/flywheel/config/FlwCommands.java +++ b/src/main/java/com/jozufozu/flywheel/config/FlwCommands.java @@ -19,7 +19,6 @@ import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.TextComponent; import net.minecraftforge.client.event.RegisterClientCommandsEvent; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; -import net.minecraftforge.fml.ModList; public class FlwCommands { public static void registerClientCommands(RegisterClientCommandsEvent event) { diff --git a/src/main/java/com/jozufozu/flywheel/core/source/ShaderSources.java b/src/main/java/com/jozufozu/flywheel/core/source/ShaderSources.java index b7e29c2a4..c4b42ec10 100644 --- a/src/main/java/com/jozufozu/flywheel/core/source/ShaderSources.java +++ b/src/main/java/com/jozufozu/flywheel/core/source/ShaderSources.java @@ -36,16 +36,14 @@ public class ShaderSources implements SourceFinder { }); for (ResourceLocation location : allShaders) { - try { - Resource resource = manager.getResource(location); - + try (Resource resource = manager.getResource(location)) { String source = StringUtil.readToString(resource.getInputStream()); ResourceLocation name = ResourceUtil.removePrefixUnchecked(location, SHADER_DIR); shaderSources.put(name, new SourceFile(this, name, source)); } catch (IOException e) { - + // } } diff --git a/src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexListUnsafe.java b/src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexListUnsafe.java index 959b90ef3..07dbdeb4d 100644 --- a/src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexListUnsafe.java +++ b/src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexListUnsafe.java @@ -1,14 +1,11 @@ package com.jozufozu.flywheel.core.vertex; -import java.nio.Buffer; import java.nio.ByteBuffer; import org.lwjgl.system.MemoryUtil; import com.jozufozu.flywheel.api.vertex.ShadedVertexList; -import com.jozufozu.flywheel.api.vertex.VertexList; import com.jozufozu.flywheel.util.RenderMath; -import com.mojang.blaze3d.platform.MemoryTracker; public class BlockVertexListUnsafe extends AbstractVertexList { diff --git a/src/main/java/com/jozufozu/flywheel/core/vertex/PosTexNormalVertexListUnsafe.java b/src/main/java/com/jozufozu/flywheel/core/vertex/PosTexNormalVertexListUnsafe.java index 79baf8e00..6b5a99305 100644 --- a/src/main/java/com/jozufozu/flywheel/core/vertex/PosTexNormalVertexListUnsafe.java +++ b/src/main/java/com/jozufozu/flywheel/core/vertex/PosTexNormalVertexListUnsafe.java @@ -1,13 +1,10 @@ package com.jozufozu.flywheel.core.vertex; -import java.nio.Buffer; import java.nio.ByteBuffer; import org.lwjgl.system.MemoryUtil; -import com.jozufozu.flywheel.api.vertex.VertexList; import com.jozufozu.flywheel.util.RenderMath; -import com.mojang.blaze3d.platform.MemoryTracker; public class PosTexNormalVertexListUnsafe extends AbstractVertexList { diff --git a/src/main/java/com/jozufozu/flywheel/util/WorldAttached.java b/src/main/java/com/jozufozu/flywheel/util/WorldAttached.java index 45b989f2f..2573a9a52 100644 --- a/src/main/java/com/jozufozu/flywheel/util/WorldAttached.java +++ b/src/main/java/com/jozufozu/flywheel/util/WorldAttached.java @@ -3,7 +3,6 @@ package com.jozufozu.flywheel.util; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.function.BiConsumer; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 2f6649f40..347fb6482 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,7 +5,7 @@ license = "MIT" [[mods]] modId = "flywheel" -version = "${file.jarVersion}" +version = "${version}" displayName = "Flywheel" logoFile = "logo.png" displayURL = "https://www.curseforge.com/minecraft/mc-mods/flywheel"