feat: hide dev capes

This commit is contained in:
Jacob
2025-06-27 08:45:48 +08:00
committed by Linnea Gräf
parent 073a62c2e3
commit 895471502e
3 changed files with 19 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ import moe.nea.firmament.features.inventory.buttons.InventoryButtons
import moe.nea.firmament.features.inventory.storageoverlay.StorageOverlay
import moe.nea.firmament.features.mining.PickaxeAbility
import moe.nea.firmament.features.mining.PristineProfitTracker
import moe.nea.firmament.features.misc.CustomCapes
import moe.nea.firmament.features.misc.Hud
import moe.nea.firmament.features.world.FairySouls
import moe.nea.firmament.features.world.Waypoints
@@ -69,6 +70,7 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
loadFeature(SaveCursorPosition)
loadFeature(PriceData)
loadFeature(Fixes)
loadFeature(CustomCapes)
loadFeature(Hud)
loadFeature(WardrobeKeybinds)
loadFeature(DianaWaypoints)

View File

@@ -16,10 +16,22 @@ import net.minecraft.client.util.BufferAllocator
import net.minecraft.client.util.SkinTextures
import net.minecraft.util.Identifier
import moe.nea.firmament.Firmament
import moe.nea.firmament.features.FirmamentFeature
import moe.nea.firmament.gui.config.ManagedConfig
import moe.nea.firmament.util.MC
import moe.nea.firmament.util.TimeMark
object CustomCapes {
object CustomCapes : FirmamentFeature {
override val identifier: String
get() = "developer-capes"
object TConfig : ManagedConfig(identifier, Category.DEV) {
val showCapes by toggle("show-cape") { true }
}
override val config: ManagedConfig
get() = TConfig
interface CustomCapeRenderer {
fun replaceRender(
renderLayer: RenderLayer,
@@ -158,7 +170,7 @@ object CustomCapes {
player: AbstractClientPlayerEntity,
playerEntityRenderState: PlayerEntityRenderState
) {
val cape = byUuid[player.uuid]
val cape = if (TConfig.showCapes) byUuid[player.uuid] else null
val capeStorage = CapeStorage.cast(playerEntityRenderState)
if (cape == null) {
capeStorage.cape_firmament = null

View File

@@ -101,6 +101,9 @@
"firmament.config.custom-skyblock-textures.skulls-enabled": "Enable Custom Placed Skull Textures",
"firmament.config.custom-skyblock-textures.skulls-enabled.description": "Allow replacing the textures of placed skulls.",
"firmament.config.developer": "Developer Settings",
"firmament.config.developer-capes": "Developer Capes",
"firmament.config.developer-capes.show-cape": "Show Developer Capes",
"firmament.config.developer-capes.show-cape.description": "Allows you to see the developer capes.",
"firmament.config.developer.auto-rebuild": "Automatically rebuild resources",
"firmament.config.developer.auto-rebuild.description": "Executes ./gradlew processResources before F3+T is executed.",
"firmament.config.diana": "Diana",