Skip to content

Commit

Permalink
initial stuff for 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pupbrained committed Dec 14, 2023
1 parent 1614508 commit a04f2f1
Show file tree
Hide file tree
Showing 19 changed files with 2,089 additions and 142 deletions.
1,877 changes: 1,877 additions & 0 deletions .direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use_flake
14 changes: 14 additions & 0 deletions .factorypath
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<factorypath>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/fabric-loom/1.20.2/net.fabricmc.yarn.1_20_2.1.20.2+build.1-v2/mappings.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.5/dc6ea1875f4d64fbc85e1691c95b96a3d8569c90/asm-9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/9.5/19ab5b5800a3910d30d3a3e64fdb00fd0cb42de0/asm-commons-9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/9.5/490bacc77de7cbc0be1a30bb3471072d705be4a4/asm-analysis-9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-mappings-parser/0.3.0+build.17/2f10540a290e382a7cd35c16ec3900046a4e252/tiny-mappings-parser-0.3.0+build.17.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/9.5/fd33c8b6373abaa675be407082fdfda35021254a/asm-tree-9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/mapping-io/0.2.1/2a1aeedce104191bbb9e39e26abfbfeaf9b0590b/mapping-io-0.2.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.8.2/2cc6565989469ec38893bfb7802b31c0d0d11ea0/tiny-remapper-0.8.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/9.5/64b5a1fc8c1b15ed2efd6a063e976bc8d3dc5ffe/asm-util-9.5.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/access-widener/2.1.0/f62a27adbfd8ab4d4fa5681793039f2c0b177155/access-widener-2.1.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/fabric-mixin-compile-extensions/0.6.0/6fda0c85c419f0a259da017a1424f27507eb30f0/fabric-mixin-compile-extensions-0.6.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="EXTJAR" id="/home/marshall/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.12.5+mixin.0.8.5/8d31fb97c3e0cd7c8dad3441851c523bcfae6d8e/sponge-mixin-0.12.5+mixin.0.8.5.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "org.quiltmc.parsers:gson:0.2.1"

modImplementation("dev.isxander.yacl:yet-another-config-lib-fabric:3.2.1+1.20.2") {
modImplementation("dev.isxander.yacl:yet-another-config-lib-fabric:3.3.1+1.20.4") {
exclude(group: "org.quiltmc.parsers")
exclude(group: "com.twelvemonkeys.common")
exclude(group: "com.twelvemonkeys.imageio")
}

modApi 'com.terraformersmc:modmenu:8.0.0'
modApi 'com.terraformersmc:modmenu:9.0.0-pre.1'
}

processResources {
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
description = "DropConfirm Nix shell";

inputs = {nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";};

outputs = {
self,
nixpkgs,
}: let
allSystems = [
"x86_64-linux"
"aarch64-darwin"
];

forAllSystems = fn:
nixpkgs.lib.genAttrs allSystems
(system: fn {pkgs = import nixpkgs {inherit system;};});
in {
devShells = forAllSystems ({pkgs}: {
default = pkgs.mkShell {
name = "default";
nativeBuildInputs = with pkgs; [libGL jdk17];
};
});
};
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.1
loader_version=0.14.23
mod_version=1.4.0+1.20.2
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.1
loader_version=0.15.0
mod_version=1.4.1+1.20.4
maven_group=xyz.pupbrained
archives_base_name=drop_confirm
fabric_version=0.90.0+1.20.2
fabric_version=0.91.1+1.20.4
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.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-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
23 changes: 10 additions & 13 deletions src/main/java/xyz/pupbrained/DropConfirm.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ public void onInitializeClient() {
DropConfirmConfig.GSON.load();

var toggleKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
"key.drop_confirm.toggle",
GLFW.GLFW_KEY_UNKNOWN,
"category.drop_confirm.keybinds"
));
"key.drop_confirm.toggle",
GLFW.GLFW_KEY_UNKNOWN,
"category.drop_confirm.keybinds"));

ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (toggleKey.wasPressed()) {
Expand All @@ -42,15 +41,13 @@ public void onInitializeClient() {
player.playSound(SoundEvents.ENTITY_ITEM_PICKUP, 1.0f, config.enabled ? 1.0f : 0.5f);

mc.inGameHud.setOverlayMessage(
Text
.literal("DropConfirm: ")
.append(
Text
.translatable(config.enabled ? "drop_confirm.toggle.on" : "drop_confirm.toggle.off")
.formatted(config.enabled ? Formatting.GREEN : Formatting.RED)
),
false
);
Text
.literal("DropConfirm: ")
.append(
Text
.translatable(config.enabled ? "drop_confirm.toggle.on" : "drop_confirm.toggle.off")
.formatted(config.enabled ? Formatting.GREEN : Formatting.RED)),
false);
}
});
}
Expand Down
Loading

0 comments on commit a04f2f1

Please sign in to comment.