User Tools

Site Tools


tutorial:mixin_injects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:mixin_injects [2025/12/15 16:52] – Added an extra bracket to show that it has to be inside @At more clearly mcgambingprotutorial:mixin_injects [2026/01/01 13:03] (current) – Remove now generally unnecessary warning header, fix monospaced consistency on MExtras injector refs gauntrecluse
Line 1: Line 1:
-FIXME //This page is due rewrites because of inaccuracies. This page may change very suddenly and should be taken with a grain of salt.// 
- 
 ====== @Inject ====== ====== @Inject ======
  
Line 23: Line 21:
  
 === Cancelling, Modifying or Diverting individual operations === === Cancelling, Modifying or Diverting individual operations ===
-It is important to not use ''@Inject'', and in particular its cancelling, if the goal can be achieved with a more precise and less intrusive changes. Injectors such as ''[[https://github.com/LlamaLad7/MixinExtras/wiki/WrapOperation|@WrapOperation]]'', [[https://github.com/LlamaLad7/MixinExtras/wiki/ModifyExpressionValue|@ModifyExpressionValue]], [[https://github.com/LlamaLad7/MixinExtras/wiki/ModifyReturnValue|@ModifyReturnValue]] or ''@ModifyArg'' are better-suited for preventing, modifying or diverting individual calls or operations, without cancelling the entire method; or applying modifications to a return value.+It is important to not use ''@Inject'', and in particular its cancelling, if the goal can be achieved with a more precise and less intrusive changes. Injectors such as ''[[https://github.com/LlamaLad7/MixinExtras/wiki/WrapOperation|@WrapOperation]]'', ''[[https://github.com/LlamaLad7/MixinExtras/wiki/ModifyExpressionValue|@ModifyExpressionValue]]''''[[https://github.com/LlamaLad7/MixinExtras/wiki/ModifyReturnValue|@ModifyReturnValue]]'' or ''@ModifyArg'' are better-suited for preventing, modifying or diverting individual calls or operations, without cancelling the entire method; or applying modifications to a return value.
  
 === Context-Sensitive Injections === === Context-Sensitive Injections ===
tutorial/mixin_injects.1765817558.txt.gz · Last modified: 2025/12/15 16:52 by mcgambingpro