aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2025-03-15 01:12:23 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2025-03-15 01:12:23 -0400
commit6ad6fe5f8931aff0945218635aff0d1ad48646d8 (patch)
treefd8cb3735cf2f23df7bca6578916bb6c772a326f
parent251daee895c9c0ad839ed9022ea43fb2d369e16c (diff)
downloadmeteor-trashy-addon-dev.tar.xz
1.21.4?HEADdev
-rw-r--r--gradle.properties8
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin43462 -> 43453 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties4
-rwxr-xr-xgradlew24
-rw-r--r--gradlew.bat20
-rw-r--r--src/main/java/org/chrisoft/trashyaddon/commands/CEntitySelectorOptions.java16
-rw-r--r--src/main/java/org/chrisoft/trashyaddon/mixin/WorldRendererMixin.java8
7 files changed, 43 insertions, 37 deletions
diff --git a/gradle.properties b/gradle.properties
index 9110957..58e3afb 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,9 +1,9 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties (https://fabricmc.net/develop)
-minecraft_version=1.21.1
-yarn_mappings=1.21.1+build.3
-loader_version=0.15.11
+minecraft_version=1.21.4
+yarn_mappings=1.21.4+build.8
+loader_version=0.16.10
# Mod Properties
mod_version=0.0.1
@@ -13,4 +13,4 @@ archives_base_name=meteor-trashy-addon
# Dependencies
# Meteor (https://maven.meteordev.org)
-meteor_version=0.5.8-SNAPSHOT
+meteor_version=1.21.4-SNAPSHOT
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index d64cd49..e644113 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0d18421..cea7a79 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index aeb74cb..b740cf1 100755
--- a/gradlew
+++ b/gradlew
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -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
@@ -130,10 +131,13 @@ 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.
@@ -141,7 +145,7 @@ 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
@@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | 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
@@ -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" \
diff --git a/gradlew.bat b/gradlew.bat
index 6689b85..7101f8e 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -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
@@ -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
diff --git a/src/main/java/org/chrisoft/trashyaddon/commands/CEntitySelectorOptions.java b/src/main/java/org/chrisoft/trashyaddon/commands/CEntitySelectorOptions.java
index c49e80f..cd28653 100644
--- a/src/main/java/org/chrisoft/trashyaddon/commands/CEntitySelectorOptions.java
+++ b/src/main/java/org/chrisoft/trashyaddon/commands/CEntitySelectorOptions.java
@@ -18,14 +18,15 @@ import net.minecraft.advancement.AdvancementProgress;
import net.minecraft.advancement.PlayerAdvancementTracker;
import net.minecraft.advancement.criterion.CriterionProgress;
import net.minecraft.command.CommandSource;
+import net.minecraft.command.FloatRangeArgument;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.condition.LootCondition;
import net.minecraft.loot.context.LootContext;
-import net.minecraft.loot.context.LootContextParameterSet;
import net.minecraft.loot.context.LootContextParameters;
import net.minecraft.loot.context.LootContextTypes;
+import net.minecraft.loot.context.LootWorldContext;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtHelper;
import net.minecraft.nbt.StringNbtReader;
@@ -46,7 +47,6 @@ import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.GameMode;
-import net.minecraft.command.FloatRangeArgument;
public class CEntitySelectorOptions {
private static final Map<String, CEntitySelectorOptions.SelectorOption> OPTIONS = Maps.newHashMap();
@@ -269,10 +269,10 @@ public class CEntitySelectorOptions {
putOption("type", reader -> {
reader.setSuggestionProvider((builder, consumer) -> {
CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.getIds(), builder, String.valueOf('!'));
- CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.streamTags().map(TagKey::id), builder, "!#");
+ CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.streamTags().map(tag -> tag.getTag().id()), builder, "!#");
if (!reader.excludesEntityType()) {
CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.getIds(), builder);
- CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.streamTags().map(TagKey::id), builder, String.valueOf('#'));
+ CommandSource.suggestIdentifiers(Registries.ENTITY_TYPE.streamTags().map(tag -> tag.getTag().id()), builder, String.valueOf('#'));
}
return builder.buildFuture();
@@ -292,7 +292,7 @@ public class CEntitySelectorOptions {
reader.addPredicate(entity -> entity.getType().isIn(lv) != bl);
} else {
Identifier lv2 = Identifier.fromCommandInput(reader.getReader());
- EntityType<?> lv3 = Registries.ENTITY_TYPE.getOrEmpty(lv2).orElseThrow(() -> {
+ EntityType<?> lv3 = Registries.ENTITY_TYPE.getOptionalValue(lv2).orElseThrow(() -> {
reader.getReader().setCursor(i);
return INVALID_TYPE_EXCEPTION.createWithContext(reader.getReader(), lv2.toString());
});
@@ -320,7 +320,7 @@ public class CEntitySelectorOptions {
if (entity instanceof ServerPlayerEntity lv2) {
ItemStack lv3 = lv2.getInventory().getMainHandStack();
if (!lv3.isEmpty()) {
- lvx.put("SelectedItem", lv3.encode(lv2.getRegistryManager()));
+ lvx.put("SelectedItem", lv3.toNbt(lv2.getRegistryManager()));
}
}
@@ -468,12 +468,12 @@ public class CEntitySelectorOptions {
Optional<LootCondition> optional = lvx.getServer()
.getReloadableRegistries()
.createRegistryLookup()
- .getOptionalEntry(RegistryKeys.PREDICATE, lv)
+ .getOptionalEntry(lv)
.map(RegistryEntry::value);
if (optional.isEmpty()) {
return false;
} else {
- LootContextParameterSet lv2 = new LootContextParameterSet.Builder(lvx)
+ LootWorldContext lv2 = new LootWorldContext.Builder(lvx)
.add(LootContextParameters.THIS_ENTITY, entity)
.add(LootContextParameters.ORIGIN, entity.getPos())
.build(LootContextTypes.SELECTOR);
diff --git a/src/main/java/org/chrisoft/trashyaddon/mixin/WorldRendererMixin.java b/src/main/java/org/chrisoft/trashyaddon/mixin/WorldRendererMixin.java
index f953e7e..16c5556 100644
--- a/src/main/java/org/chrisoft/trashyaddon/mixin/WorldRendererMixin.java
+++ b/src/main/java/org/chrisoft/trashyaddon/mixin/WorldRendererMixin.java
@@ -20,7 +20,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = WorldRenderer.class, priority = 999)
public abstract class WorldRendererMixin {
@Shadow
- private Framebuffer entityOutlinesFramebuffer;
+ private Framebuffer entityOutlineFramebuffer;
@Shadow
protected abstract void renderEntity(Entity entity, double cameraX, double cameraY, double cameraZ, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers);
@@ -34,15 +34,15 @@ public abstract class WorldRendererMixin {
@Unique
private void drawShaded(Entity entity, double cameraX, double cameraY, double cameraZ, float tickDelta, VertexConsumerProvider vertexConsumers, MatrixStack matrices, EntityShader shader, Color color) {
if (shader.shouldDraw(entity) && !PostProcessShaders.isCustom(vertexConsumers) && color != null) {
- Framebuffer prevBuffer = this.entityOutlinesFramebuffer;
- this.entityOutlinesFramebuffer = shader.framebuffer;
+ Framebuffer prevBuffer = this.entityOutlineFramebuffer;
+ this.entityOutlineFramebuffer = shader.framebuffer;
PostProcessShaders.rendering = true;
shader.vertexConsumerProvider.setColor(color.r, color.g, color.b, color.a);
renderEntity(entity, cameraX, cameraY, cameraZ, tickDelta, matrices, shader.vertexConsumerProvider);
PostProcessShaders.rendering = false;
- this.entityOutlinesFramebuffer = prevBuffer;
+ this.entityOutlineFramebuffer = prevBuffer;
}
}
}