|
1 | 1 | package dev.ryanhcode.sable.mixin.command; |
2 | 2 |
|
3 | 3 | import com.mojang.brigadier.arguments.ArgumentType; |
| 4 | +import dev.ryanhcode.sable.Sable; |
4 | 5 | import dev.ryanhcode.sable.api.command.SubLevelArgumentType; |
5 | 6 | import dev.ryanhcode.sable.command.Vec3ArgumentAbsolute; |
6 | | -import net.minecraft.commands.arguments.coordinates.Vec3Argument; |
7 | 7 | import net.minecraft.commands.synchronization.ArgumentTypeInfo; |
8 | 8 | import net.minecraft.commands.synchronization.ArgumentTypeInfos; |
9 | 9 | import net.minecraft.commands.synchronization.SingletonArgumentInfo; |
|
18 | 18 | public abstract class ArgumentTypeInfosMixin { |
19 | 19 |
|
20 | 20 | @Shadow |
21 | | - protected static <A extends ArgumentType<?>, T extends ArgumentTypeInfo.Template<A>> ArgumentTypeInfo<A, T> register(final Registry<ArgumentTypeInfo<?, ?>> arg, final String string, final Class<? extends A> class_, final ArgumentTypeInfo<A, T> arg2) { |
| 21 | + private static <A extends ArgumentType<?>, T extends ArgumentTypeInfo.Template<A>> ArgumentTypeInfo<A, T> register(final Registry<ArgumentTypeInfo<?, ?>> arg, final String string, final Class<? extends A> class_, final ArgumentTypeInfo<A, T> arg2) { |
22 | 22 | return null; |
23 | 23 | } |
24 | 24 |
|
25 | 25 | @Inject(method = "bootstrap", at = @At("TAIL")) |
26 | 26 | private static void sable$bootstrap(final Registry<ArgumentTypeInfo<?, ?>> registry, final CallbackInfoReturnable<ArgumentTypeInfo<?, ?>> cir) { |
27 | | - register(registry, "sable:sub_level", SubLevelArgumentType.class, new SubLevelArgumentType.Info()); |
28 | | - register(registry, "sable:vec3_absolute", Vec3ArgumentAbsolute.class, SingletonArgumentInfo.contextFree(Vec3ArgumentAbsolute::vec3)); |
| 27 | + register(registry, Sable.MOD_ID + ":sub_level", SubLevelArgumentType.class, new SubLevelArgumentType.Info()); |
| 28 | + register(registry, Sable.MOD_ID + ":vec3_absolute", Vec3ArgumentAbsolute.class, SingletonArgumentInfo.contextFree(Vec3ArgumentAbsolute::vec3)); |
29 | 29 | } |
30 | | - |
31 | 30 | } |
0 commit comments