From 918ee6ab5bc62f926edd34ac209a48ddeb71ae12 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 4 Jul 2025 19:30:31 +0200 Subject: feat: add colour config options --- src/main/kotlin/features/items/EtherwarpOverlay.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin/features/items') diff --git a/src/main/kotlin/features/items/EtherwarpOverlay.kt b/src/main/kotlin/features/items/EtherwarpOverlay.kt index 2de2159..b1f695a 100644 --- a/src/main/kotlin/features/items/EtherwarpOverlay.kt +++ b/src/main/kotlin/features/items/EtherwarpOverlay.kt @@ -1,12 +1,13 @@ package moe.nea.firmament.features.items +import io.github.notenoughupdates.moulconfig.ChromaColour import me.shedaniel.math.Color +import net.minecraft.util.hit.BlockHitResult import moe.nea.firmament.annotations.Subscribe +import moe.nea.firmament.events.WorldRenderLastEvent import moe.nea.firmament.features.FirmamentFeature import moe.nea.firmament.gui.config.ManagedConfig import moe.nea.firmament.util.MC -import net.minecraft.util.hit.BlockHitResult -import moe.nea.firmament.events.WorldRenderLastEvent import moe.nea.firmament.util.extraAttributes import moe.nea.firmament.util.render.RenderInWorldContext import moe.nea.firmament.util.skyBlockId @@ -19,6 +20,7 @@ object EtherwarpOverlay : FirmamentFeature { object TConfig : ManagedConfig(identifier, Category.ITEMS) { var etherwarpOverlay by toggle("etherwarp-overlay") { false } var cube by toggle("cube") { true } + val cubeColour by colour("cube-colour") { ChromaColour.fromStaticRGB(172, 0, 255, 60) } var wireframe by toggle("wireframe") { false } } @@ -44,7 +46,7 @@ object EtherwarpOverlay : FirmamentFeature { if (!world.getBlockState(blockPos.up()).isAir) return if (!world.getBlockState(blockPos.up(2)).isAir) return RenderInWorldContext.renderInWorld(event) { - if (TConfig.cube) block(blockPos, Color.ofRGBA(172, 0, 255, 60).color) + if (TConfig.cube) block(blockPos, TConfig.cubeColour.getEffectiveColourRGB()) if (TConfig.wireframe) wireframeCube(blockPos, 10f) } } -- cgit