Skip to content

Commit

Permalink
Add enabled check around custom hit color
Browse files Browse the repository at this point in the history
  • Loading branch information
lowercasebtw committed Jan 13, 2025
1 parent 619b250 commit 720f9cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ modmenu_version=13.0.0
yacl_version=3.6.2+1.21.4-fabric

# Mod Properties
mod_version=1.0.0-dev-24
mod_version=1.0.0-dev-25
maven_group=btw.mixces
archives_base_name=animatium
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package btw.mixces.animatium.mixins;

import btw.mixces.animatium.AnimatiumClient;
import btw.mixces.animatium.config.AnimatiumConfig;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.util.ARGB;
Expand All @@ -13,7 +14,11 @@
public abstract class MixinOverlayTexture {
@ModifyConstant(method = "<init>", constant = @Constant(intValue = -1291911168))
private int animatium$modifyDamageTintColor(int constant) {
Color hitColor = AnimatiumConfig.instance().getCustomHitColor();
return ARGB.color(AnimatiumConfig.instance().getDeepRedHurtTint() ? 128 : 178, hitColor.getRed(), hitColor.getGreen(), hitColor.getBlue());
if (AnimatiumClient.getEnabled()) {
Color hitColor = AnimatiumConfig.instance().getCustomHitColor();
return ARGB.color(AnimatiumConfig.instance().getDeepRedHurtTint() ? 128 : 178, hitColor.getRed(), hitColor.getGreen(), hitColor.getBlue());
} else {
return constant;
}
}
}
2 changes: 1 addition & 1 deletion src/main/kotlin/btw/mixces/animatium/AnimatiumClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AnimatiumClient : ClientModInitializer {

// Info
const val VERSION = 1.0
val DEVELOPMENT_VERSION = Optional.ofNullable(24)
val DEVELOPMENT_VERSION = Optional.ofNullable(25)

@JvmStatic
fun location(path: String): ResourceLocation {
Expand Down

0 comments on commit 720f9cf

Please sign in to comment.