drafts:mixin_example_rewrite
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| drafts:mixin_example_rewrite [2025/10/13 21:04] – created gauntrecluse | drafts:mixin_example_rewrite [2025/10/15 01:41] (current) – Fix gauntrecluse | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ====== Mixin Examples (DRAFT) ====== | ====== Mixin Examples (DRAFT) ====== | ||
| - | This is not intended for first learning how to use certain Mixin tools entirely, moreso, it is meant to illustrate syntax, and explain the different elements of it. It is meant to still be a step above a simple cheat sheet in terms of detailing and explanations, | + | This is not intended for first learning how to use certain Mixin tools entirely, moreso, it is meant to illustrate syntax, and explain the different elements of it. It is meant to still be a step above a simple cheat sheet in terms of detailing and explanations, |
| + | |||
| + | One should read [[tutorial: | ||
| + | |||
| + | ===== General Injection ===== | ||
| + | //TODO: This section will cover injection related examples that do not fit into any other category// | ||
| + | |||
| + | ==== Injecting at the head of a method ==== | ||
| + | |||
| + | ==== Injecting at the tail of a method ==== | ||
| + | //TODO: Specify difference between the end of a method block and its " | ||
| + | |||
| + | ==== Injecting after the target via shifting ==== | ||
| + | //TODO: Shift.AFTER; | ||
| ---- | ---- | ||
| + | |||
| + | ===== Targeting Tools ===== | ||
| + | //TODO: This section will cover targeting using tools other than injection point references, notably Slices and Expressions// | ||
| + | ==== Narrowing with a Slice ==== | ||
| + | //TODO: @Slice; This should mention that '' | ||
| + | |||
| + | ==== Targeting an Expression ==== | ||
| + | //TODO: This will likely just link back to the MixinExtras Wiki's relevant article, at least at first, as it has much more comprehensive examples, and creating similarly comprehensive examples will require a lot of care.//\\ | ||
| + | :!: //This tool is included in MixinExtras 0.5.0 and onward, which is included in Fabric Loader 0.17.0 and onward; it also requires a specific [[https:// | ||
| + | |||
| + | ==== Using ordinals ==== | ||
| + | //TODO: This will need a notification that it is more brittle than slices and expressions.// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Redirecting ===== | ||
| + | //TODO: This section will cover redirectors, | ||
| + | |||
| + | :!: // | ||
| + | |||
| + | ==== Redirect a method call ==== | ||
| + | //TODO: @Redirect// | ||
| + | |||
| + | ==== Redirecting a constant ==== | ||
| + | //TODO: @ModifyConstant// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Overwriting ===== | ||
| + | //TODO: This will very briefly go over using method overwrites, but this obviously is the lowest priority given it is nearly absolutely never needed to overwrite a method.// | ||
| + | :!: // | ||
| + | ===== Further Reading ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
drafts/mixin_example_rewrite.1760389489.txt.gz · Last modified: 2025/10/13 21:04 by gauntrecluse