https://modrinth.com/mod/breakfree

Update to 1.21

+94 -61
+23 -14
build.gradle
··· 1 1 plugins { 2 - id 'fabric-loom' version '0.12-SNAPSHOT' 2 + id 'fabric-loom' version '1.6-SNAPSHOT' 3 3 id 'maven-publish' 4 4 } 5 5 6 - sourceCompatibility = JavaVersion.VERSION_17 7 - targetCompatibility = JavaVersion.VERSION_17 8 - 9 - archivesBaseName = project.archives_base_name 10 6 version = project.mod_version 11 7 group = project.maven_group 8 + 9 + base { 10 + archivesName = project.archives_base_name 11 + } 12 12 13 13 repositories { 14 14 // Add repositories to retrieve artifacts from in here. ··· 18 18 // for more information about repositories. 19 19 } 20 20 21 + loom { 22 + splitEnvironmentSourceSets() 23 + 24 + mods { 25 + "breakfree" { 26 + sourceSet sourceSets.main 27 + sourceSet sourceSets.client 28 + } 29 + } 30 + } 31 + 21 32 dependencies { 22 33 // To change the versions see the gradle.properties file 23 34 minecraft "com.mojang:minecraft:${project.minecraft_version}" ··· 25 36 modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" 26 37 27 38 // Fabric API. This is technically optional, but you probably want it anyway. 28 - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 29 - 30 - // Uncomment the following line to enable the deprecated Fabric API modules. 31 - // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. 32 - 33 - // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" 39 + //modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 34 40 } 35 41 36 42 processResources { ··· 42 48 } 43 49 44 50 tasks.withType(JavaCompile).configureEach { 45 - // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. 46 - it.options.release = 17 51 + it.options.release = 21 47 52 } 48 53 49 54 java { ··· 51 56 // if it is present. 52 57 // If you remove this line, sources will not be generated. 53 58 withSourcesJar() 59 + 60 + sourceCompatibility = JavaVersion.VERSION_21 61 + targetCompatibility = JavaVersion.VERSION_21 54 62 } 55 63 56 64 jar { ··· 62 70 // configure the maven publication 63 71 publishing { 64 72 publications { 65 - mavenJava(MavenPublication) { 73 + create("mavenJava", MavenPublication) { 74 + artifactId = project.archives_base_name 66 75 from components.java 67 76 } 68 77 }
+10 -6
gradle.properties
··· 1 1 # Done to increase the memory available to gradle. 2 2 org.gradle.jvmargs=-Xmx1G 3 + org.gradle.parallel=true 4 + 3 5 # Fabric Properties 4 6 # check these on https://fabricmc.net/versions.html 5 - minecraft_version=1.20.2-pre1 6 - yarn_mappings=1.20.2-pre1+build.3 7 - loader_version=0.14.22 7 + minecraft_version=1.21 8 + yarn_mappings=1.21+build.1 9 + loader_version=0.15.11 10 + 8 11 # Mod Properties 9 - mod_version=1.2.0 10 - maven_group=io.gtihub.justapotota 12 + mod_version=1.3.0 13 + maven_group=io.github.justapotota 11 14 archives_base_name=breakfree 15 + 12 16 # Dependencies 13 17 # check this on https://fabricmc.net/versions.html 14 - fabric_version=0.88.2+1.20.2 18 + fabric_version=0.100.1+1.21
gradle/wrapper/gradle-wrapper.jar

This is a binary file and will not be displayed.

+3 -1
gradle/wrapper/gradle-wrapper.properties
··· 1 1 distributionBase=GRADLE_USER_HOME 2 2 distributionPath=wrapper/dists 3 - distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 3 + distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 4 + networkTimeout=10000 5 + validateDistributionUrl=true 4 6 zipStoreBase=GRADLE_USER_HOME 5 7 zipStorePath=wrapper/dists
+33 -18
gradlew
··· 1 1 #!/bin/sh 2 2 3 3 # 4 - # Copyright � 2015-2021 the original authors. 4 + # Copyright © 2015-2021 the original authors. 5 5 # 6 6 # Licensed under the Apache License, Version 2.0 (the "License"); 7 7 # you may not use this file except in compliance with the License. ··· 32 32 # Busybox and similar reduced shells will NOT work, because this script 33 33 # requires all of these POSIX shell features: 34 34 # * functions; 35 - # * expansions �$var�, �${var}�, �${var:-default}�, �${var+SET}�, 36 - # �${var#prefix}�, �${var%suffix}�, and �$( cmd )�; 37 - # * compound commands having a testable exit status, especially �case�; 38 - # * various built-in commands including �command�, �set�, and �ulimit�. 35 + # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 + # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 + # * compound commands having a testable exit status, especially «case»; 38 + # * various built-in commands including «command», «set», and «ulimit». 39 39 # 40 40 # Important for patching: 41 41 # ··· 55 55 # Darwin, MinGW, and NonStop. 56 56 # 57 57 # (3) This script is generated from the Groovy template 58 - # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 58 + # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 59 # within the Gradle project. 60 60 # 61 61 # You can find Gradle at https://github.com/gradle/gradle/. ··· 80 80 esac 81 81 done 82 82 83 - APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 - 85 - APP_NAME="Gradle" 83 + # This is normally unused 84 + # shellcheck disable=SC2034 86 85 APP_BASE_NAME=${0##*/} 87 - 88 - # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 - DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 86 + # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 87 + APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit 90 88 91 89 # Use the maximum available, or set MAX_FD != -1 to use that value. 92 90 MAX_FD=maximum ··· 133 131 fi 134 132 else 135 133 JAVACMD=java 136 - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 134 + if ! command -v java >/dev/null 2>&1 135 + then 136 + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 137 138 138 Please set the JAVA_HOME variable in your environment to match the 139 139 location of your Java installation." 140 + fi 140 141 fi 141 142 142 143 # Increase the maximum file descriptors if we can. 143 144 if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 145 case $MAX_FD in #( 145 146 max*) 147 + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 148 + # shellcheck disable=SC2039,SC3045 146 149 MAX_FD=$( ulimit -H -n ) || 147 150 warn "Could not query maximum file descriptor limit" 148 151 esac 149 152 case $MAX_FD in #( 150 153 '' | soft) :;; #( 151 154 *) 155 + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 156 + # shellcheck disable=SC2039,SC3045 152 157 ulimit -n "$MAX_FD" || 153 158 warn "Could not set maximum file descriptor limit to $MAX_FD" 154 159 esac ··· 193 198 done 194 199 fi 195 200 196 - # Collect all arguments for the java command; 197 - # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 - # shell script including quotes and variable substitutions, so put them in 199 - # double quotes to make sure that they get re-expanded; and 200 - # * put everything else in single quotes, so that it's not re-expanded. 201 + 202 + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 203 + DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 204 + 205 + # Collect all arguments for the java command: 206 + # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 207 + # and any embedded shellness will be escaped. 208 + # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 209 + # treated as '${Hostname}' itself on the command line. 201 210 202 211 set -- \ 203 212 "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 213 -classpath "$CLASSPATH" \ 205 214 org.gradle.wrapper.GradleWrapperMain \ 206 215 "$@" 216 + 217 + # Stop when "xargs" is not available. 218 + if ! command -v xargs >/dev/null 2>&1 219 + then 220 + die "xargs is not available" 221 + fi 207 222 208 223 # Use "xargs" to parse quoted args. 209 224 #
+19 -16
gradlew.bat
··· 14 14 @rem limitations under the License. 15 15 @rem 16 16 17 - @if "%DEBUG%" == "" @echo off 17 + @if "%DEBUG%"=="" @echo off 18 18 @rem ########################################################################## 19 19 @rem 20 20 @rem Gradle startup script for Windows ··· 25 25 if "%OS%"=="Windows_NT" setlocal 26 26 27 27 set DIRNAME=%~dp0 28 - if "%DIRNAME%" == "" set DIRNAME=. 28 + if "%DIRNAME%"=="" set DIRNAME=. 29 + @rem This is normally unused 29 30 set APP_BASE_NAME=%~n0 30 31 set APP_HOME=%DIRNAME% 31 32 ··· 40 41 41 42 set JAVA_EXE=java.exe 42 43 %JAVA_EXE% -version >NUL 2>&1 43 - if "%ERRORLEVEL%" == "0" goto execute 44 + if %ERRORLEVEL% equ 0 goto execute 44 45 45 - echo. 46 - echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 - echo. 48 - echo Please set the JAVA_HOME variable in your environment to match the 49 - echo location of your Java installation. 46 + echo. 1>&2 47 + echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 48 + echo. 1>&2 49 + echo Please set the JAVA_HOME variable in your environment to match the 1>&2 50 + echo location of your Java installation. 1>&2 50 51 51 52 goto fail 52 53 ··· 56 57 57 58 if exist "%JAVA_EXE%" goto execute 58 59 59 - echo. 60 - echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 - echo. 62 - echo Please set the JAVA_HOME variable in your environment to match the 63 - echo location of your Java installation. 60 + echo. 1>&2 61 + echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 62 + echo. 1>&2 63 + echo Please set the JAVA_HOME variable in your environment to match the 1>&2 64 + echo location of your Java installation. 1>&2 64 65 65 66 goto fail 66 67 ··· 75 76 76 77 :end 77 78 @rem End local scope for the variables with windows NT shell 78 - if "%ERRORLEVEL%"=="0" goto mainEnd 79 + if %ERRORLEVEL% equ 0 goto mainEnd 79 80 80 81 :fail 81 82 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 83 rem the _cmd.exe /c_ return code! 83 - if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 - exit /b 1 84 + set EXIT_CODE=%ERRORLEVEL% 85 + if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 + if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 + exit /b %EXIT_CODE% 85 88 86 89 :mainEnd 87 90 if "%OS%"=="Windows_NT" endlocal
+1
settings.gradle
··· 4 4 name = 'Fabric' 5 5 url = 'https://maven.fabricmc.net/' 6 6 } 7 + mavenCentral() 7 8 gradlePluginPortal() 8 9 } 9 10 }
+1 -1
src/main/java/io/gtihub/justapotota/breakfree/mixin/ClientPlayerInteractionManagerMixin.java src/client/java/io/github/justapotota/breakfree/mixin/ClientPlayerInteractionManagerMixin.java
··· 1 - package io.gtihub.justapotota.breakfree.mixin; 1 + package io.github.justapotota.breakfree.mixin; 2 2 3 3 import net.minecraft.client.network.ClientPlayerInteractionManager; 4 4 import net.minecraft.item.ItemStack;
src/main/resources/assets/breakfree/icon.png src/client/resources/assets/breakfree/icon.png
src/main/resources/assets/breakfree/lang/en_us.json src/client/resources/assets/breakfree/lang/en_us.json
src/main/resources/assets/breakfree/lang/ru_ru.json src/client/resources/assets/breakfree/lang/ru_ru.json
+1 -1
src/main/resources/breakfree.mixins.json src/client/resources/breakfree.mixins.json
··· 1 1 { 2 2 "required": true, 3 3 "minVersion": "0.8", 4 - "package": "io.gtihub.justapotota.breakfree.mixin", 4 + "package": "io.github.justapotota.breakfree.mixin", 5 5 "compatibilityLevel": "JAVA_16", 6 6 "mixins": [ 7 7 ],
+3 -4
src/main/resources/fabric.mod.json src/client/resources/fabric.mod.json
··· 19 19 "breakfree.mixins.json" 20 20 ], 21 21 "depends": { 22 - "fabricloader": ">=0.14.21", 23 - "fabric": "*", 24 - "minecraft": "1.20.x", 25 - "java": ">=17" 22 + "fabricloader": ">=0.15.10", 23 + "minecraft": "1.21.x", 24 + "java": ">=21" 26 25 } 27 26 }