mixin-cheatsheet icon indicating copy to clipboard operation
mixin-cheatsheet copied to clipboard

Redirect NEW

Open valoeghese opened this issue 3 years ago • 1 comments

Does not have a tutorial on redirecting NEW.

It's pretty simple and useful but I don't use it enough to always remember the exact format so having it here would be nice

valoeghese avatar Feb 17 '22 23:02 valoeghese

Okay yep it's just

@Redirect(method = "someMethod", at = @At(value = "NEW", target = "some/package/SomeClass"))
private SomeClass someRedirect(the constructor parameters) {
}

no L and ; needed on the class in target

valoeghese avatar Feb 17 '22 23:02 valoeghese