Skip to content

Commit

Permalink
fix bug & bump version (0.1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
TehcJS authored and sylv256 committed Jul 29, 2022
1 parent 88a9243 commit 96dc423
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dependencies {

// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
// Quilted Fabric API will automatically pull in the correct QSL version.
modImplementation(libs.quilted.fabric.api)
modRuntimeOnly(libs.quilted.fabric.api)

annotationProcessor("net.auoeke:uncheck:latest.release")

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ kotlin.code.style=official
org.gradle.jvmargs=-Xmx1G

# Mod Properties
modVersion = 0.1.0
modVersion = 0.1.1
mavenGroup = net.cursedmc
modId = yqh
6 changes: 4 additions & 2 deletions src/main/java/net/cursedmc/yqh/api/mixin/Mixout.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ static void registerPostMixin(TransformEvent callback) {
POST_MIXIN.add(callback);
}

static void preMixin(String name, ClassNode cn) {
static boolean preMixin(String name, ClassNode cn) {
PRE_MIXIN.forEach(callback -> callback.transform(name, cn));
return PRE_MIXIN.isEmpty();
}

static void postMixin(String name, ClassNode cn) {
static boolean postMixin(String name, ClassNode cn) {
POST_MIXIN.forEach(callback -> callback.transform(name, cn));
return POST_MIXIN.isEmpty();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ public class HackedMixinProcessor extends MixinProcessor {

@Override
synchronized boolean applyMixins(MixinEnvironment environment, String name, ClassNode targetClassNode) {
Mixout.TransformEvent.preMixin(name, targetClassNode);
boolean applied = super.applyMixins(environment, name, targetClassNode);
Mixout.TransformEvent.postMixin(name, targetClassNode);
return applied;
boolean shouldApply;

shouldApply = Mixout.TransformEvent.preMixin(name, targetClassNode);
shouldApply |= super.applyMixins(environment, name, targetClassNode);
shouldApply |= Mixout.TransformEvent.postMixin(name, targetClassNode);

return shouldApply;
}
}
1 change: 0 additions & 1 deletion src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"id": "quilt_loader",
"versions": ">=0.17.0-"
},
"quilted_fabric_api",
"minecraft"
],
"language_adapters": {
Expand Down

0 comments on commit 96dc423

Please sign in to comment.