Closed dhyces closed 6 months ago
Wanted to pick people's minds about this kind of annotation:
@Inject(method = "hurt", at = @At("HEAD")) private void myMixin(int arg, CallbackInfo ci, @This LivingEntity thiz) { if (thiz instanceof Player player) { // do something } else if (thiz instanceof Shulker shulker) { // do something else } }
Very simple example, it's just for convenience, makes things a little more straightforward
You already have this directly, together with appropriate shadowing, extending of the target's parent or casting.
this
That was closed quickly :p, but I completely understand
Wanted to pick people's minds about this kind of annotation:
Very simple example, it's just for convenience, makes things a little more straightforward