User Tools

Site Tools


tutorial:mixin_glossary

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:mixin_glossary [2025/11/29 03:42] gauntreclusetutorial:mixin_glossary [2025/11/29 03:49] (current) gauntrecluse
Line 220: Line 220:
  
 ==== Targeting Tools ==== ==== Targeting Tools ====
-Outside of [[#injection_point|Injection Points]], the Mixin toolchain provides different features that may be used to more precisely target a specific element of a target method matching the injection point. This is useful for making an injector less "[[#brittle|brittle]]", and making it +Outside of [[#injection_point|Injection Points]], the Mixin toolchain provides different features that may be used to more precisely target a specific element of a target method matching the injection point. This is essential for making an injector less "[[#brittle|brittle]]", and making more precise changes which are more compatible. Note that different discriminators may be combined, such as using both an [[#expressions|expression]] and a [[#slice,_slicing|slice]] for the same injector if needed.
  
  
Line 234: Line 234:
   - Added in MixinExtras ''0.5.0'', a feature consisting of injection point ''"MIXINEXTRAS:EXPRESSION"'' and associated tools, such as ''@Expression'' and ''@Definition''. Used to allow injectors to target a very wide range of instructions in a target method by using java-like expressions closer to a source code representation. MixinExtras ''0.5.0'' is bundled with Fabric Loader 0.17.0 and later.   - Added in MixinExtras ''0.5.0'', a feature consisting of injection point ''"MIXINEXTRAS:EXPRESSION"'' and associated tools, such as ''@Expression'' and ''@Definition''. Used to allow injectors to target a very wide range of instructions in a target method by using java-like expressions closer to a source code representation. MixinExtras ''0.5.0'' is bundled with Fabric Loader 0.17.0 and later.
     - To "use an expression" may refer to using MixinExtras Expressions to target a certain piece of target code.     - To "use an expression" may refer to using MixinExtras Expressions to target a certain piece of target code.
-    * See [[https://github.com/LlamaLad7/MixinExtras/wiki/Expressions|the official wiki articles]]+    * See [[https://github.com/LlamaLad7/MixinExtras/wiki/Expressions|the official wiki articles and tutorial.]]
  
 == MixinExtras Flowchart == == MixinExtras Flowchart ==
Line 240: Line 240:
  
 == @Definition == == @Definition ==
-  - In the context of Expressions a "definition" is used to refer to ''@Definition'' annotation usages. Definitions are used to declare what individual identifiers within an expression correspond to in code, such as types, methods, or variables.+  - In the context of [[#expressions|expressions]], a "definition" is used to refer to ''@Definition'' annotation usages. Definitions are used to declare what individual identifiers within an expression correspond to in code, such as types, methods, or variables.
  
 == Wildcard == == Wildcard ==
Line 247: Line 247:
  
 == Ordinal == == Ordinal ==
-  - Zero-indexed integer value used to select a single target within the list of potential targets based on other discriminators and targeting tools. An ordinal of 0 would target the first of the potential targets by order of appearance in bytecode, for instance+  - A discriminator which, between all valid targets once other filters and discriminators are applied, uses a zero-indexed value to select one of the remaining targets for the injector to target
-    * Ordinals are generally a more brittle and less recommended discriminator for targeting using injectors.+    * Ordinals are generally a more [[#brittle|brittle]] and less recommended discriminator for targeting using injectors. Using [[#slice,_slicing|slices]] or [[#expressions|expressions]] is recommended instead in cases where an ordinal would be only used as a disambiguation tool between different targets for an injection point.
tutorial/mixin_glossary.txt · Last modified: 2025/11/29 03:49 by gauntrecluse