Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit dabf10d

Browse files
committed
Fix duplicated methods from stirrin and dasm
1 parent 274ea20 commit dabf10d

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import java.util.*
88
buildscript {
99
dependencies {
1010
classpath("com.google.code.gson:gson:2.8.5")
11-
classpath("io.github.opencubicchunks:stirrin:1.1.4")
11+
classpath("io.github.opencubicchunks:stirrin:1.1.6")
1212
}
1313
}
1414
plugins {
@@ -20,7 +20,7 @@ plugins {
2020
id("io.github.opencubicchunks.gradle.mcGitVersion")
2121
id("io.github.opencubicchunks.gradle.mixingen")
2222
id("io.github.opencubicchunks.gradle.dasm")
23-
id("io.github.opencubicchunks.stirrin").version("1.1.3")
23+
id("io.github.opencubicchunks.stirrin").version("1.1.6")
2424
}
2525

2626
stirrin {
@@ -290,7 +290,7 @@ dependencies {
290290
debugCompile("org.lwjgl:lwjgl-vulkan:$lwjglVersion")
291291
debugRuntime("org.lwjgl:lwjgl::$lwjglNatives")
292292

293-
include(implementation("com.github.OpenCubicChunks:dasm:81e0a37")!!)
293+
include(implementation("com.github.OpenCubicChunks:dasm:94f5c0c00a")!!)
294294
include(implementation("io.github.opencubicchunks:regionlib:0.63.0-SNAPSHOT")!!)
295295
include(implementation("org.spongepowered:noise:2.0.0-SNAPSHOT")!!)
296296

src/main/java/io/github/opencubicchunks/cubicchunks/mixin/AnnotationConfigPlugin.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static org.objectweb.asm.Opcodes.*;
44

5+
import java.util.Iterator;
56
import java.util.List;
67
import java.util.Set;
78

@@ -50,5 +51,15 @@ public AnnotationConfigPlugin() {
5051
}
5152

5253
@Override public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) {
54+
// Making any methods annotated as @Public public
55+
for (Iterator<MethodNode> it = targetClass.methods.iterator(); it.hasNext(); ) {
56+
MethodNode method = it.next();
57+
List<AnnotationNode> visibleAnnotations = method.visibleAnnotations;
58+
if (visibleAnnotations != null) {
59+
if (visibleAnnotations.stream().anyMatch(annotationNode -> annotationNode.desc.equals("Lio/github/opencubicchunks/stirrin/Stub;"))) {
60+
it.remove();
61+
}
62+
}
63+
}
5364
}
5465
}

0 commit comments

Comments
 (0)