From 2e3a49756b20ca7a727ca925588b860168054ad6 Mon Sep 17 00:00:00 2001 From: gnembon Date: Tue, 6 Apr 2021 21:05:34 -0300 Subject: [PATCH] mapping --- gradle.properties | 2 +- src/main/java/carpet/script/command/CommandArgument.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index f061ddd8..caa9c9c8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G # check these on https://fabricmc.net/use # or better: https://modmuss50.me/fabric.html minecraft_version=21w13a - yarn_mappings=21w13a+build.34 + yarn_mappings=21w13a+build.55 loader_version=0.11.3 fabric_version=0.32.6+1.17 diff --git a/src/main/java/carpet/script/command/CommandArgument.java b/src/main/java/carpet/script/command/CommandArgument.java index 80f6062b..6406373a 100644 --- a/src/main/java/carpet/script/command/CommandArgument.java +++ b/src/main/java/carpet/script/command/CommandArgument.java @@ -56,7 +56,7 @@ import net.minecraft.command.argument.MessageArgumentType; import net.minecraft.command.argument.StatusEffectArgumentType; import net.minecraft.command.argument.NbtCompoundTagArgumentType; import net.minecraft.command.argument.NbtPathArgumentType; -import net.minecraft.command.argument.NbtTagArgumentType; +import net.minecraft.command.argument.NbtElementArgumentType; import net.minecraft.command.argument.NumberRangeArgumentType; import net.minecraft.command.argument.ScoreboardObjectiveArgumentType; import net.minecraft.command.argument.ScoreboardCriterionArgumentType; @@ -697,16 +697,16 @@ public abstract class CommandArgument @Override protected ArgumentType getArgumentType() { - return mapRequired?NbtCompoundTagArgumentType.nbtCompound(): NbtTagArgumentType.nbtTag(); + return mapRequired?NbtCompoundTagArgumentType.nbtCompound(): NbtElementArgumentType.nbtElement(); } @Override protected Value getValueFromContext(CommandContext context, String param) throws CommandSyntaxException { if (mapRequired) - return new NBTSerializableValue(NbtCompoundTagArgumentType.getCompoundTag(context, param)); + return new NBTSerializableValue(NbtCompoundTagArgumentType.getNbtCompound(context, param)); else - return new NBTSerializableValue(NbtTagArgumentType.getTag(context, param)); + return new NBTSerializableValue(NbtElementArgumentType.getNbtElement(context, param)); } @Override