forked from IrisShaders/Iris
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing dependencies causing a crash (#507)
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/main/java/net/coderbot/iris/mixin/OculusMixinPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package net.coderbot.iris.mixin; | ||
|
||
import net.minecraftforge.fml.loading.LoadingModList; | ||
import org.objectweb.asm.tree.ClassNode; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; | ||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class OculusMixinPlugin implements IMixinConfigPlugin { | ||
@Override | ||
public void onLoad(String s) { | ||
|
||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String s, String s1) { | ||
// Forge 1.20.1 and older load mixins even if there is a mod loading error, but | ||
// don't load ATs, which causes a ton of support requests from our mixins failing | ||
// to apply. The solution is to just not apply them ourselves if there is an error. | ||
return LoadingModList.get().getErrors().isEmpty(); | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> set, Set<String> set1) { | ||
|
||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return List.of(); | ||
} | ||
|
||
@Override | ||
public void preApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
|
||
@Override | ||
public void postApply(String s, ClassNode classNode, String s1, IMixinInfo iMixinInfo) { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters