fix: adjust signature of mixin constructor redirect

dependabot/gradle/org.projectlombok-lombok-1.18.34 1.0.12
William 5 months ago
parent 58d20a3a8c
commit 187acc9195
No known key found for this signature in database

@ -39,17 +39,18 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public class ArgumentNodeMixin {
@Invoker("<init>")
private static ArgumentNode createArgumentNode(String name, ArgumentSerializer.ArgumentTypeProperties<?> properties, @Nullable Identifier id) {
private static ArgumentNode createArgumentNode(String name, ArgumentSerializer.ArgumentTypeProperties<?> properties,
@Nullable Identifier id) {
throw new AssertionError();
}
@Redirect(method = "<init>(Lcom/mojang/brigadier/tree/ArgumentCommandNode;)V", at = @At("HEAD"))
private static <A> ArgumentNode onConstruct(ArgumentCommandNode<CommandSource, A> node) {
private static ArgumentNode onConstruct(ArgumentCommandNode<CommandSource, ?> node) {
ArgumentSerializer.ArgumentTypeProperties<?> properties;
try {
properties = ArgumentTypes.get(node.getType()).getArgumentTypeProperties(node.getType());
properties = ArgumentTypes.getArgumentTypeProperties(node.getType());
} catch (IllegalArgumentException e) {
properties = ArgumentTypes.get(StringArgumentType.string()).getArgumentTypeProperties(StringArgumentType.string());
properties = ArgumentTypes.getArgumentTypeProperties(StringArgumentType.string());
}
return createArgumentNode(

@ -39,17 +39,18 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public class ArgumentNodeMixin {
@Invoker("<init>")
private static ArgumentNode createArgumentNode(String name, ArgumentSerializer.ArgumentTypeProperties<?> properties, @Nullable Identifier id) {
private static ArgumentNode createArgumentNode(String name, ArgumentSerializer.ArgumentTypeProperties<?> properties,
@Nullable Identifier id) {
throw new AssertionError();
}
@Redirect(method = "<init>(Lcom/mojang/brigadier/tree/ArgumentCommandNode;)V", at = @At("HEAD"))
private static <A> ArgumentNode onConstruct(ArgumentCommandNode<CommandSource, A> node) {
private static ArgumentNode onConstruct(ArgumentCommandNode<CommandSource, ?> node) {
ArgumentSerializer.ArgumentTypeProperties<?> properties;
try {
properties = ArgumentTypes.get(node.getType()).getArgumentTypeProperties(node.getType());
properties = ArgumentTypes.getArgumentTypeProperties(node.getType());
} catch (IllegalArgumentException e) {
properties = ArgumentTypes.get(StringArgumentType.string()).getArgumentTypeProperties(StringArgumentType.string());
properties = ArgumentTypes.getArgumentTypeProperties(StringArgumentType.string());
}
return createArgumentNode(

@ -3,6 +3,6 @@ javaVersion=17
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
org.gradle.daemon=true
library_version=1.0.11
library_version=1.0.12
library_archive=uniform
library_description=Cross-platform wrapper for making Brigadier commands, based on BrigadierWrapper by Tofaa2, itself inspired by emortalmcs command system.
Loading…
Cancel
Save