Skip to content

Commit f37480a

Browse files
committed
Too many fixes and update to 1.21.4
1 parent e3b015f commit f37480a

26 files changed

+299
-1189
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v4
10+
11+
- name: Set up Java
12+
uses: actions/setup-java@v4
13+
with:
14+
distribution: 'adopt'
15+
java-version: 21
16+
17+
- name: Build
18+
run: ./gradlew build
19+
20+
- name: Upload artifacts
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: build-artifacts
24+
path: build/libs/

.github/workflows/dev_build.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
<img src="https://img.shields.io/badge/Minecraft%20Version-1.20.2-blueviolet" alt="Minecraft Version">
1111
</div>
1212

13-
<div align="center">
14-
<a href="https://discord.gg/u3XNcDZyrY"><img src="https://invidget.switchblade.xyz/u3XNcDZyrY"></a>
15-
</div>
16-
1713
# How to use
1814
- Download the lastest Meteor Client DevBuild.
1915
- Put NF Addon in your `.minecraft/mods` folder where you have installed Meteor.

build.gradle

Lines changed: 0 additions & 50 deletions
This file was deleted.

build.gradle.kts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
plugins {
2+
id("fabric-loom") version "1.10-SNAPSHOT"
3+
}
4+
5+
base {
6+
archivesName = project.property("archives_base_name").toString()
7+
version = project.property("mod_version").toString()
8+
group = project.property("maven_group").toString()
9+
}
10+
11+
repositories {
12+
maven("https://maven.meteordev.org/releases") {
13+
name = "meteor-maven"
14+
}
15+
16+
maven("https://maven.meteordev.org/snapshots") {
17+
name = "meteor-maven-snapshots"
18+
}
19+
20+
maven("https://babbaj.github.io/maven/") {
21+
name = "babbaj-maven"
22+
}
23+
}
24+
25+
dependencies {
26+
// Fabric
27+
minecraft("com.mojang:minecraft:${project.property("minecraft_version")}")
28+
mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2")
29+
modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}")
30+
31+
// Meteor
32+
modImplementation("meteordevelopment:meteor-client:${project.property("minecraft_version")}-SNAPSHOT")
33+
34+
// Baritone
35+
modImplementation("dev.babbaj:nether-pathfinder:1.4.1")
36+
modImplementation("meteordevelopment:baritone:${project.property("minecraft_version")}-SNAPSHOT")
37+
}
38+
39+
tasks {
40+
processResources {
41+
val propertiesMap = mapOf(
42+
"version" to project.version,
43+
"minecraft_version" to project.property("minecraft_version"),
44+
"loader_version" to project.property("loader_version")
45+
)
46+
47+
inputs.properties(propertiesMap)
48+
filesMatching("fabric.mod.json") {
49+
expand(propertiesMap)
50+
}
51+
}
52+
53+
withType<JavaCompile> {
54+
options.encoding = "UTF-8"
55+
options.release = 21
56+
}
57+
58+
java {
59+
sourceCompatibility = JavaVersion.VERSION_21
60+
targetCompatibility = JavaVersion.VERSION_21
61+
}
62+
}
63+
64+
loom {
65+
accessWidenerPath = file("src/main/resources/netherfreedom.accesswidener")
66+
}

gradle.properties

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
org.gradle.jvmargs=-Xmx2G
22

33
# Fabric Properties (https://fabricmc.net/develop/)
4-
minecraft_version=1.20.2
5-
yarn_mappings=1.20.2+build.4
6-
loader_version=0.14.24
4+
minecraft_version=1.21.4
5+
yarn_mappings=1.21.4+build.8
6+
loader_version=0.16.10
77

88
# Mod Properties
99
mod_version=1.4
1010
maven_group=netherfreedom.package
1111
archives_base_name=NF-Addon
12-
13-
# Dependencies
14-
15-
# Meteor (https://maven.meteordev.org/)
16-
meteor_version=0.5.5
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (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
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +82,11 @@ do
8082
esac
8183
done
8284

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
85+
# This is normally unused
86+
# shellcheck disable=SC2034
8687
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"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s' "$PWD" ) || exit
9090

9191
# Use the maximum available, or set MAX_FD != -1 to use that value.
9292
MAX_FD=maximum
@@ -133,22 +133,29 @@ location of your Java installation."
133133
fi
134134
else
135135
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.
136+
if ! command -v java >/dev/null 2>&1
137+
then
138+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137139
138140
Please set the JAVA_HOME variable in your environment to match the
139141
location of your Java installation."
142+
fi
140143
fi
141144

142145
# Increase the maximum file descriptors if we can.
143146
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144147
case $MAX_FD in #(
145148
max*)
149+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
150+
# shellcheck disable=SC2039,SC3045
146151
MAX_FD=$( ulimit -H -n ) ||
147152
warn "Could not query maximum file descriptor limit"
148153
esac
149154
case $MAX_FD in #(
150155
'' | soft) :;; #(
151156
*)
157+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
158+
# shellcheck disable=SC2039,SC3045
152159
ulimit -n "$MAX_FD" ||
153160
warn "Could not set maximum file descriptor limit to $MAX_FD"
154161
esac
@@ -193,18 +200,28 @@ if "$cygwin" || "$msys" ; then
193200
done
194201
fi
195202

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.
203+
204+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
205+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206+
207+
# Collect all arguments for the java command:
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209+
# and any embedded shellness will be escaped.
210+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211+
# treated as '${Hostname}' itself on the command line.
201212

202213
set -- \
203214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
204215
-classpath "$CLASSPATH" \
205216
org.gradle.wrapper.GradleWrapperMain \
206217
"$@"
207218

219+
# Stop when "xargs" is not available.
220+
if ! command -v xargs >/dev/null 2>&1
221+
then
222+
die "xargs is not available"
223+
fi
224+
208225
# Use "xargs" to parse quoted args.
209226
#
210227
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

src/main/java/me/redcarlos/netherfreedom/NFAddon.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package me.redcarlos.netherfreedom;
22

33
import com.mojang.logging.LogUtils;
4-
import me.redcarlos.netherfreedom.modules.hud.NFBindsHud;
54
import me.redcarlos.netherfreedom.modules.hud.NFWelcomeHud;
65
import me.redcarlos.netherfreedom.modules.main.*;
76
import meteordevelopment.meteorclient.addons.MeteorAddon;
7+
import meteordevelopment.meteorclient.pathing.BaritoneUtils;
88
import meteordevelopment.meteorclient.systems.Systems;
99
import meteordevelopment.meteorclient.systems.hud.Hud;
1010
import meteordevelopment.meteorclient.systems.hud.HudGroup;
@@ -30,24 +30,23 @@ public void onInitialize() {
3030
Modules modules = Modules.get();
3131

3232
// Main
33-
modules.add(new AfkLogout());
34-
modules.add(new ArmorNotify());
35-
modules.add(new AutoWalkPlus());
36-
modules.add(new BaritoneMiner());
33+
modules.add(new AutoWalkNF());
34+
3735
modules.add(new DiggingTools());
38-
modules.add(new DiscordRPC());
3936
modules.add(new HandManager());
4037
modules.add(new HotbarManager());
4138
//modules.add(new NetherrackTracker());
42-
modules.add(new NFAnnouncer());
43-
modules.add(new NFBorer());
39+
modules.add(new NetherBorer());
4440
modules.add(new NFRotation());
4541
modules.add(new NFScaffold());
4642

4743
// HUD
4844
Hud hud = Systems.get(Hud.class);
49-
hud.register(NFBindsHud.INFO);
5045
hud.register(NFWelcomeHud.INFO);
46+
47+
if (BaritoneUtils.IS_AVAILABLE) {
48+
modules.add(new BaritoneMiner());
49+
}
5150
}
5251

5352
@Override

0 commit comments

Comments
 (0)