mapping
This commit is contained in:
1 parent
820c9b6489
commit
e4ebeda1d0
2 files changed
+6
-6
No files matched your search
+2
-2
@@ -5,9 +5,9 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=21w17a
|
minecraft_version=21w17a
|
||||||
yarn_mappings=21w17a+build.2
|
yarn_mappings=21w17a+build.19
|
||||||
loader_version=0.11.3
|
loader_version=0.11.3
|
||||||
fabric_version=0.33.3+1.17
|
fabric_version=0.34.0+1.17
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.34
|
mod_version = 1.4.34
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import net.minecraft.command.argument.ItemSlotArgumentType;
|
|||||||
import net.minecraft.command.argument.ItemStackArgumentType;
|
import net.minecraft.command.argument.ItemStackArgumentType;
|
||||||
import net.minecraft.command.argument.MessageArgumentType;
|
import net.minecraft.command.argument.MessageArgumentType;
|
||||||
import net.minecraft.command.argument.StatusEffectArgumentType;
|
import net.minecraft.command.argument.StatusEffectArgumentType;
|
||||||
import net.minecraft.command.argument.NbtCompoundTagArgumentType;
|
import net.minecraft.command.argument.NbtCompoundArgumentType;
|
||||||
import net.minecraft.command.argument.NbtPathArgumentType;
|
import net.minecraft.command.argument.NbtPathArgumentType;
|
||||||
import net.minecraft.command.argument.NbtElementArgumentType;
|
import net.minecraft.command.argument.NbtElementArgumentType;
|
||||||
import net.minecraft.command.argument.NumberRangeArgumentType;
|
import net.minecraft.command.argument.NumberRangeArgumentType;
|
||||||
@@ -691,20 +691,20 @@ public abstract class CommandArgument
|
|||||||
boolean mapRequired;
|
boolean mapRequired;
|
||||||
private TagArgument()
|
private TagArgument()
|
||||||
{
|
{
|
||||||
super("tag", NbtCompoundTagArgumentType.nbtCompound().getExamples(), false);
|
super("tag", NbtCompoundArgumentType.nbtCompound().getExamples(), false);
|
||||||
mapRequired = true;
|
mapRequired = true;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected ArgumentType<?> getArgumentType()
|
protected ArgumentType<?> getArgumentType()
|
||||||
{
|
{
|
||||||
return mapRequired?NbtCompoundTagArgumentType.nbtCompound(): NbtElementArgumentType.nbtElement();
|
return mapRequired?NbtCompoundArgumentType.nbtCompound(): NbtElementArgumentType.nbtElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Value getValueFromContext(CommandContext<ServerCommandSource> context, String param) throws CommandSyntaxException
|
protected Value getValueFromContext(CommandContext<ServerCommandSource> context, String param) throws CommandSyntaxException
|
||||||
{
|
{
|
||||||
if (mapRequired)
|
if (mapRequired)
|
||||||
return new NBTSerializableValue(NbtCompoundTagArgumentType.getNbtCompound(context, param));
|
return new NBTSerializableValue(NbtCompoundArgumentType.getNbtCompound(context, param));
|
||||||
else
|
else
|
||||||
return new NBTSerializableValue(NbtElementArgumentType.getNbtElement(context, param));
|
return new NBTSerializableValue(NbtElementArgumentType.getNbtElement(context, param));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user