Closed Barteks2x closed 7 years ago
Hmm weird, can you gist/link the mixin in question.
I already fixed the problem but it shouldn't be hard to re-create it. As I said, the problem isn't that it's crashing, because the mixin is not valid. All I did was skip args = "array=get"
in redirect.
This mixin shows that confusing crash:
@Mixin(Chunk.class)
public abstract class MixinChunk_Cubes {
@Redirect(
method = "getEntitiesWithinAABBForEntity",
at = @At(value = "FIELD", target = "Lnet/minecraft/world/chunk/Chunk;entityLists:[Lnet/minecraft/util/ClassInheritanceMultiMap;"/*, args = "array=get"*/)
)
private ClassInheritanceMultiMap<Entity> getEntAABBFor_CubicChunks_EntityListsGetRedirect(ClassInheritanceMultiMap<Entity>[] array, int index) {
return array[index];
}
}
It should crash, but also shoudl tell me which redirect it is.
Right, yes that makes sense. It shouldn't crash there though if that argument is omitted, and it certainly shouldn't let an NPE propagate that far up the stack without being caught by the injector. There are two problems it seems: 1- missing a null check on that arg and 2- the cause is being omitted when pretty-printing the error. Both of these are fixable.
Also, does it really have to repeat the stacktrace in different forms 6 times in total?
The problem isn't that it crashes, but that it doesn't show any information about which redirect causes the issue, in my case the exception looked like this: