Skip to content

Commit 2aea1c5

Browse files
committed
make it work with java 8 and stuff
1 parent 320f05e commit 2aea1c5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

TODO.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
- [use simple structuring like with autoconfig](https://shedaniel.gitbook.io/cloth-config/auto-config/creating-a-config-class)
66
- [ ] add java docs as a github page
77
- [ ] fix maven
8-
- [ ] possibly use annotations in mixins to specify which version they should be run on? (possibly with the help of mixin plugins)?
9-
- [ ] e.g. @MinecraftVersion("1.21") or something (dunno if it's even possible)
8+
- [x] possibly use annotations in mixins to specify which version they should be run on? (possibly with the help of mixin plugins)?
9+
- [x] e.g. @MinecraftVersion("1.21") or something (dunno if it's even possible)
1010
- [ ] find out how to bundle multiple versions in one jar (e.g. 1.16.5, 1.19, 1.21 from stonecutter)

src/main/java/net/notcoded/codelib/common/mixinhelper/MixinPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
3838
List<String> minecraftVersions = new ArrayList<>();
3939

4040
for(Annotation annotation : clazz.getAnnotations()) { // this is cursed but it somehow works
41-
if(annotation.annotationType().descriptorString().equals(MinecraftVersion.class.descriptorString())) {
41+
if(annotation.annotationType().toGenericString().equals(MinecraftVersion.class.toGenericString())) {
4242
try {
4343
minecraftVersions = Arrays.asList((String[]) annotation.annotationType().getMethod("minecraft").invoke(annotation));
4444
break;

src/main/java/net/notcoded/codelib/common/mixinhelper/annotation/MinecraftVersion.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package net.notcoded.codelib.common.mixinhelper.annotation;
22

3-
import org.spongepowered.asm.mixin.Mixin;
4-
53
import java.lang.annotation.ElementType;
64
import java.lang.annotation.Retention;
75
import java.lang.annotation.RetentionPolicy;

0 commit comments

Comments
 (0)