Skip to content

Commit

Permalink
Fix mod from blowing up
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixces committed Jun 23, 2024
1 parent f9bcd2c commit 46d2a54
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class RenderItemMixin_GlintCustomizer {
)
private void glintColorizer$push(IBakedModel model, CallbackInfo ci) {
if (!RenderItemHook.INSTANCE.isPotionGlintEnabled()) { return; }
if (!glintColorizer$shouldApplyMatrix()) { return; }
if (glintColorizer$shouldApplyMatrix()) { return; }
GlStateManager.pushMatrix();
}

Expand Down Expand Up @@ -245,10 +245,10 @@ public class RenderItemMixin_GlintCustomizer {

@Unique
private boolean glintColorizer$shouldApplyMatrix() {
return GlintConfig.INSTANCE.getPotionGlintSize() &&
RenderItemHook.INSTANCE.isRenderingInGUI() &&
RenderItemHook.INSTANCE.isPotionItem() &&
(GlintConfig.INSTANCE.getPotionGlintForeground() || GlintConfig.INSTANCE.getPotionGlintBackground());
return !GlintConfig.INSTANCE.getPotionGlintSize() ||
!RenderItemHook.INSTANCE.isRenderingInGUI() ||
!RenderItemHook.INSTANCE.isPotionItem() ||
(!GlintConfig.INSTANCE.getPotionGlintForeground() && !GlintConfig.INSTANCE.getPotionGlintBackground());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,18 @@ object GlintConfig : Config(
)
var potionGlintForeground = false

@ColorEntry(
category = "Shiny Pots"
)
var shinyPots = GlintEffectOptions()

@Checkbox(
name = "Custom Shiny Effect Color",
category = "Shiny Pots",
subcategory = "Color"
)
var potionGlintBackground = false

@ColorEntry(
category = "Shiny Pots"
)
var shinyPots = GlintEffectOptions()

@Switch(
name = "Potion Color Based Glint",
category = "Shiny Pots",
Expand All @@ -210,10 +210,6 @@ object GlintConfig : Config(

init {
initialize()

// addDependency("potionGlintType", "potionGlint")
// addDependency("strokeOne", "individualStrokes")
// addDependency("strokeTwo", "individualStrokes")
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import cc.polyfrost.oneconfig.config.core.OneColor
class GlintEffectOptions {

@Button(
name = "Reset Held Glint Colors",
name = "Reset Glint Colors",
subcategory = "Configuration",
text = "Reset",
description = "Resets ALL custom glint colors."
Expand Down

0 comments on commit 46d2a54

Please sign in to comment.