diff options
author | Linnea Gräf <nea@nea.moe> | 2025-07-04 19:30:31 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-07-04 19:30:31 +0200 |
commit | 918ee6ab5bc62f926edd34ac209a48ddeb71ae12 (patch) | |
tree | 8cc6fc4686252c860d858bc3a4b7dca294deeb94 /src/main/kotlin/features/items | |
parent | 89642c2443c559ae383b03cd367b392cf08bf29a (diff) | |
download | Firmament-918ee6ab5bc62f926edd34ac209a48ddeb71ae12.tar.gz Firmament-918ee6ab5bc62f926edd34ac209a48ddeb71ae12.tar.bz2 Firmament-918ee6ab5bc62f926edd34ac209a48ddeb71ae12.zip |
feat: add colour config options
Diffstat (limited to 'src/main/kotlin/features/items')
-rw-r--r-- | src/main/kotlin/features/items/EtherwarpOverlay.kt | 8 |
1 files changed, 5 insertions, 3 deletions
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) } } |