Skip to content

Commit

Permalink
Fix invalid generated code from NBT Compound argument in annotation e…
Browse files Browse the repository at this point in the history
…xample project
  • Loading branch information
JorelAli committed Dec 12, 2023
1 parent 64c6ec3 commit 1782863
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,12 @@ private <T extends Annotation> Map<Integer, String> emitArgumentsAndGenerateArgu

// Handle return types
Primitive primitive = getPrimitive(argumentAnnotation);
if(primitive.value().length == 1) {
argumentMapping.put(i - 1, primitive.value()[0]);
if (argumentAnnotation instanceof ANBTCompoundArgument) {
argumentMapping.put(i - 1, parameter.asType().toString());
} else {
if(primitive.value().length == 1) {
argumentMapping.put(i - 1, primitive.value()[0]);
}
}
}

Expand Down

0 comments on commit 1782863

Please sign in to comment.