This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
forked from HO-Artisan/CreateFabric-REIBugFix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
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
59 changes: 59 additions & 0 deletions
59
src/main/java/ho/artisan/createreibugfix/CFREIBFMixinPlugin.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,59 @@ | ||
package ho.artisan.createreibugfix; | ||
|
||
import it.unimi.dsi.fastutil.objects.Object2BooleanMap; | ||
import it.unimi.dsi.fastutil.objects.Object2BooleanOpenHashMap; | ||
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 CFREIBFMixinPlugin implements IMixinConfigPlugin { | ||
private final Object2BooleanMap<String> conditionalMixins = new Object2BooleanOpenHashMap<>(); | ||
|
||
public CFREIBFMixinPlugin() { | ||
boolean isREIInstalled = CreateFabricREIBugFixMod.isREIInstalled(); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.AssemblySpoutingMixin", isREIInstalled); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.BasinCategoryMixin", isREIInstalled); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.CreateDisplayMixin", isREIInstalled); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.CrushingCategoryMixin", isREIInstalled); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.MillingCategoryMixin", isREIInstalled); | ||
this.conditionalMixins.put("ho.artisan.createreibugfix.mixin.SequencedAssemblyRecipeMixin", isREIInstalled); | ||
} | ||
|
||
@Override | ||
public void onLoad(String mixinPackage) { | ||
|
||
} | ||
|
||
@Override | ||
public String getRefMapperConfig() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { | ||
return this.conditionalMixins.getOrDefault(mixinClassName, true); | ||
} | ||
|
||
@Override | ||
public void acceptTargets(Set<String> myTargets, Set<String> otherTargets) { | ||
|
||
} | ||
|
||
@Override | ||
public List<String> getMixins() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
|
||
@Override | ||
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
|
||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -30,7 +30,6 @@ | |
"fabric": "*", | ||
"minecraft": "1.20.x", | ||
"java": ">=17", | ||
"roughlyenoughitems": "*", | ||
"create": "*" | ||
} | ||
} |