Skip to content

Commit df26ffe

Browse files
Revise some Mixin Tags (#205)
* Remove Fabric Wiki and Mixin CheatSheet links The Fabric Wiki is still mostly unreliable, and the CheatSheet is very outdated. * Emphasize the cheatsheet is severely outdated The Mixin CheatSheet has not been updated in 6 years and still contains things like using localcapture over `@Local`. * Conform to `modid$name` convention for duck interface and accessor snippets; add wiki link to accessors tag The Accessors Wiki page has been revised and should be reliable now.
1 parent 396520a commit df26ffe

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

tags/faq/mixin.ytag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Mixin is a trait/mixin and bytecode weaving framework for Java using ASM written
66

77
Mixin Wiki: <https://github.com/SpongePowered/Mixin/wiki>
88
Javadoc: <http://jenkins.liteloader.com/view/Other/job/Mixin/javadoc/index.html>
9-
Fabric Wiki tutorial: <https://fabricmc.net/wiki/tutorial:mixin_introduction>
10-
Cheatsheet: <https://github.com/2xsaiko/mixin-cheatsheet/blob/master/README.md>
9+
MixinExtras Wiki: <https://github.com/LlamaLad7/MixinExtras/wiki/>
1110

1211
See also:
1312
`!!mcdev` - An IntelliJ plugin which adds useful helpers and inspections for using mixin
1413
`!!spongecord` - The Sponge Discord server, with official support for Mixin in the `#mixin` channel
14+
<#807617700734042122> - The Fabric Discord support channel for Mixins, with a pinned introduction message

tags/link/mixincs.ytag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ type: text
22

33
---
44

5-
Mixin Cheatsheet: https://github.com/2xsaiko/mixin-cheatsheet/blob/master/README.md
5+
Mixin Cheatsheet (!! Severely Outdated !!): https://github.com/2xsaiko/mixin-cheatsheet/blob/master/README.md

tags/snippet/accessor.ytag

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ io/github/mymod/mixin/MyClassAccess
66
```java
77
@Mixin(MyClass.class)
88
public interface MyClassAccess {
9-
@Invoker void callAccess();
10-
@Accessor int getMyField();
9+
@Invoker void modid$callAccess();
10+
@Accessor int modid$getMyField();
1111
}
1212
```
1313
to use it
1414
```java
1515
public class Container {
1616
public void slapHaykam(MyClass instance) {
17-
((MyClassAccess)instance).callAccess();
17+
((MyClassAccess)instance).modid$callAccess();
1818
}
1919
}
2020
```
21+
More information at <https://wiki.fabricmc.net/tutorial:mixin_accessors>

tags/snippet/🦆.ytag

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ io/github/mymod/mixin/MyClassMixin
1010
@Mixin(MyClass.class)
1111
public class MyClassMixin implements MyClassAccess {
1212
@Override
13-
public void mymod$access() {
13+
public void modid$access() {
1414
System.out.println("Accessed!");
1515
}
1616
}
@@ -21,15 +21,15 @@ io/github/mymod/access/MyClassAccess
2121
// The duck interface being implemented onto `MyClass`
2222
public interface MyClassAccess {
2323
// Make sure to prefix the method name with your mod id to prevent conflicts with other mods
24-
void mymod$access();
24+
void modid$access();
2525
}
2626
```
2727

2828
To use it:
2929
```java
3030
public class Container {
3131
public void slapHaykam(MyClass instance) {
32-
((MyClassAccess)instance).mymod$access(); // Will print "Accessed!"
32+
((MyClassAccess)instance).modid$access(); // Will print "Accessed!"
3333
}
3434
}
3535
```

0 commit comments

Comments
 (0)