diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt index d01d7d0fd..4dcf2b376 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/energy/IMatteryEnergyStorage.kt @@ -372,5 +372,5 @@ fun IMatteryEnergyStorage.getBarColor(): Int { if (!maxBatteryLevel.isPositive) return 0 - return RGBAColor.LOW_POWER.linearInterpolation((batteryLevel / maxBatteryLevel).toFloat(), RGBAColor.FULL_POWER).toRGB() + return RGBAColor.LOW_POWER.linearInterpolation((batteryLevel / maxBatteryLevel).toFloat(), RGBAColor.FULL_POWER).toBGR() } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt index 34096e6b6..9ef928958 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IMatterStorage.kt @@ -123,7 +123,7 @@ fun IMatterStorage.getBarWidth(): Int { } fun IMatterStorage.getBarColor(): Int { - return RGBAColor.LOW_MATTER.linearInterpolation((storedMatter / maxStoredMatter).toFloat(), RGBAColor.FULL_MATTER).toRGB() + return RGBAColor.LOW_MATTER.linearInterpolation((storedMatter / maxStoredMatter).toFloat(), RGBAColor.FULL_MATTER).toBGR() } val ICapabilityProvider.matter: IMatterStorage? get() = getCapability(MatteryCapability.MATTER).orNull() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt index 0c2f26341..8b3886e1d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/matter/IPatternStorage.kt @@ -73,7 +73,7 @@ fun IPatternStorage.getBarWidth(): Int { } fun IPatternStorage.getBarColor(): Int { - return RGBAColor.LOW_PATTERNS.linearInterpolation((storedPatterns / patternCapacity).toFloat(), RGBAColor.FULL_PATTERNS).toRGB() + return RGBAColor.LOW_PATTERNS.linearInterpolation((storedPatterns / patternCapacity).toFloat(), RGBAColor.FULL_PATTERNS).toBGR() } val ICapabilityProvider.patterns: IPatternStorage? get() = getCapability(MatteryCapability.PATTERN).orNull() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/FontRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/FontRenderer.kt index a98bca877..0afbfc0a0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/FontRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/FontRenderer.kt @@ -168,7 +168,7 @@ private fun Font.drawInternal( text, (x + shadowX) * inv, (y + shadowY) * inv, - shadowColor.toRGB(), + shadowColor.toBGR(), false, poseStack.last().pose(), buffer, @@ -192,7 +192,7 @@ private fun Font.drawInternal( text, x * inv + _x, y * inv + _y, - outlineColor.toRGB(), + outlineColor.toBGR(), drawShadow, poseStack.last().pose(), buffer, @@ -211,7 +211,7 @@ private fun Font.drawInternal( text, x * inv, y * inv, - color.toRGB(), + color.toBGR(), drawShadow, poseStack.last().pose(), buffer, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jade/providers/MatterBottlerProvider.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jade/providers/MatterBottlerProvider.kt index d43f7827f..463e215fe 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jade/providers/MatterBottlerProvider.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/jade/providers/MatterBottlerProvider.kt @@ -55,7 +55,7 @@ object MatterBottlerProvider : IBlockComponentProvider, IServerDataProvider if (layer == 0) (stack.item as DyeableArmorItem).getColor(stack) else -1 }, *MItems.TRITANIUM_ARMOR.toTypedArray() ) - event.register({ _, layer -> if (layer == 1) RGBAColor.AQUA.toARGB() else -1 }, + event.register({ _, layer -> if (layer == 1) RGBAColor.AQUA.toBGRA() else -1 }, *MItems.MachineUpgrades.Creative.LIST.toTypedArray()) }