diff options
Diffstat (limited to 'src/main/kotlin/features')
4 files changed, 24 insertions, 12 deletions
diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt index ec62aa6..548552c 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt @@ -1,5 +1,6 @@ package moe.nea.firmament.features.inventory.storageoverlay +import io.github.notenoughupdates.moulconfig.ChromaColour import java.util.SortedMap import kotlinx.serialization.serializer import net.minecraft.client.gui.screen.ingame.GenericContainerScreen @@ -28,6 +29,15 @@ object StorageOverlay : FirmamentFeature { object TConfig : ManagedConfig(identifier, Category.INVENTORY) { val alwaysReplace by toggle("always-replace") { true } val outlineActiveStoragePage by toggle("outline-active-page") { false } + val outlineActiveStoragePageColour by colour("outline-active-page-colour") { + ChromaColour.fromRGB( + 255, + 255, + 0, + 0, + 255 + ) + } val columns by integer("rows", 1, 10) { 3 } val height by integer("height", 80, 3000) { 3 * 18 * 6 } val scrollSpeed by integer("scroll-speed", 1, 50) { 10 } diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt index 84d0f2b..460a949 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt @@ -499,7 +499,7 @@ class StorageOverlayScreen : Screen(Text.literal("")) { y + 3 + textRenderer.fontHeight, PAGE_WIDTH, inv.rows * SLOT_SIZE + 4, - 0xFFFF00FF.toInt() + StorageOverlay.TConfig.outlineActiveStoragePageColour.getEffectiveColourRGB() ) context.drawText( textRenderer, Text.literal(name), x + 6, y + 3, diff --git a/src/main/kotlin/features/items/BonemerangOverlay.kt b/src/main/kotlin/features/items/BonemerangOverlay.kt index 11351f1..ffdffe3 100644 --- a/src/main/kotlin/features/items/BonemerangOverlay.kt +++ b/src/main/kotlin/features/items/BonemerangOverlay.kt @@ -57,13 +57,16 @@ object BonemerangOverlay : FirmamentFeature { } + val throwableWeapons = listOf( + SkyBlockItems.BONE_BOOMERANG, SkyBlockItems.STARRED_BONE_BOOMERANG, + SkyBlockItems.TRIBAL_SPEAR, + ) + + @Subscribe fun onEntityRender(event: EntityRenderTintEvent) { if (!TConfig.highlightHitEntities) return - if (MC.stackInHand.skyBlockId !in listOf( - SkyBlockItems.BONE_BOOMERANG, SkyBlockItems.STARRED_BONE_BOOMERANG - ) - ) return + if (MC.stackInHand.skyBlockId !in throwableWeapons) return val entities = getEntities() if (entities.isEmpty()) return @@ -80,10 +83,7 @@ object BonemerangOverlay : FirmamentFeature { @Subscribe fun onRenderHud(it: HudRenderEvent) { if (!TConfig.bonemerangOverlay) return - if (MC.stackInHand.skyBlockId !in listOf( - SkyBlockItems.BONE_BOOMERANG, SkyBlockItems.STARRED_BONE_BOOMERANG - ) - ) return + if (MC.stackInHand.skyBlockId !in throwableWeapons) return val entities = getEntities() 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) } } |