|
37 | 37 | import java.util.Set; |
38 | 38 | import java.util.function.Function; |
39 | 39 | import net.minecraft.ChatFormatting; |
40 | | -import net.minecraft.advancements.critereon.MinMaxBounds; |
| 40 | +import net.minecraft.advancements.criterion.MinMaxBounds; |
41 | 41 | import net.minecraft.commands.CommandBuildContext; |
42 | 42 | import net.minecraft.commands.arguments.AngleArgument; |
43 | 43 | import net.minecraft.commands.arguments.ColorArgument; |
44 | 44 | import net.minecraft.commands.arguments.CompoundTagArgument; |
45 | 45 | import net.minecraft.commands.arguments.EntityAnchorArgument; |
| 46 | +import net.minecraft.commands.arguments.IdentifierArgument; |
46 | 47 | import net.minecraft.commands.arguments.MessageArgument; |
47 | 48 | import net.minecraft.commands.arguments.NbtPathArgument; |
48 | 49 | import net.minecraft.commands.arguments.NbtTagArgument; |
|
51 | 52 | import net.minecraft.commands.arguments.ParticleArgument; |
52 | 53 | import net.minecraft.commands.arguments.RangeArgument; |
53 | 54 | import net.minecraft.commands.arguments.ResourceKeyArgument; |
54 | | -import net.minecraft.commands.arguments.ResourceLocationArgument; |
55 | 55 | import net.minecraft.commands.arguments.UuidArgument; |
56 | 56 | import net.minecraft.commands.arguments.blocks.BlockPredicateArgument; |
57 | 57 | import net.minecraft.commands.arguments.coordinates.SwizzleArgument; |
|
61 | 61 | import net.minecraft.core.registries.Registries; |
62 | 62 | import net.minecraft.nbt.CompoundTag; |
63 | 63 | import net.minecraft.nbt.Tag; |
| 64 | +import net.minecraft.resources.Identifier; |
64 | 65 | import net.minecraft.resources.ResourceKey; |
65 | | -import net.minecraft.resources.ResourceLocation; |
66 | 66 | import net.minecraft.world.scores.PlayerTeam; |
67 | 67 | import net.minecraft.world.scores.criteria.ObjectiveCriteria; |
68 | 68 | import org.apiguardian.api.API; |
@@ -129,7 +129,7 @@ public static <C, S> void register( |
129 | 129 | registerConstantNativeParserSupplier(manager, OperationArgument.Operation.class, OperationArgument.operation()); |
130 | 130 | registerConstantNativeParserSupplier(manager, AngleArgument.SingleAngle.class, AngleArgument.angle()); |
131 | 131 | registerConstantNativeParserSupplier(manager, new TypeToken<>() {}, SwizzleArgument.swizzle()); |
132 | | - registerConstantNativeParserSupplier(manager, ResourceLocation.class, ResourceLocationArgument.id()); |
| 132 | + registerConstantNativeParserSupplier(manager, Identifier.class, IdentifierArgument.id()); |
133 | 133 | registerConstantNativeParserSupplier(manager, EntityAnchorArgument.Anchor.class, EntityAnchorArgument.anchor()); |
134 | 134 | registerConstantNativeParserSupplier(manager, MinMaxBounds.Ints.class, RangeArgument.intRange()); |
135 | 135 | registerConstantNativeParserSupplier(manager, MinMaxBounds.Doubles.class, RangeArgument.floatRange()); |
@@ -222,7 +222,7 @@ private static <C, S> void registerRegistryEntryMappings( |
222 | 222 | final Set<Class<?>> seenClasses = new HashSet<>(); |
223 | 223 | /* Some registries have types that are too generic... we'll skip those for now. |
224 | 224 | * Eventually, these could be resolved by using ParserParameters in some way? */ |
225 | | - seenClasses.add(ResourceLocation.class); |
| 225 | + seenClasses.add(Identifier.class); |
226 | 226 | seenClasses.add(Codec.class); |
227 | 227 | seenClasses.add(String.class); // avoid pottery pattern registry overriding default string parser |
228 | 228 | for (final Field field : Registries.class.getDeclaredFields()) { |
|
0 commit comments