Skip to content

Commit

Permalink
Added compatibility with FermiumASM
Browse files Browse the repository at this point in the history
  • Loading branch information
Asek3 committed Mar 26, 2024
1 parent 2453b1f commit c383b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ dependencies {
// mod compat
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-242818:2779848")
implementation rfg.deobf("curse.maven:censoredasm-460609:4800875")
implementation rfg.deobf("curse.maven:fermiumasm-971247:5116326")

// testing
//implementation rfg.deobf("curse.maven:enderio-64578:4674244")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

public class SpriteUtil {
private static final boolean USING_CENSORED_ASM = Loader.isModLoaded("loliasm");
private static final boolean USING_FERMIUM_ASM = Loader.isModLoaded("normalasm");
public static void markSpriteActive(TextureAtlasSprite sprite) {
if (USING_CENSORED_ASM && sprite instanceof IAnimatedSpriteActivator) {
((IAnimatedSpriteActivator) sprite).setActive(true);
} else if (USING_FERMIUM_ASM && sprite instanceof mirror.normalasm.client.sprite.ondemand.IAnimatedSpriteActivator) {
((mirror.normalasm.client.sprite.ondemand.IAnimatedSpriteActivator) sprite).setActive(true);
}
}
}

0 comments on commit c383b16

Please sign in to comment.