feat: hide dev capes
This commit is contained in:
@@ -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.inventory.storageoverlay.StorageOverlay
|
||||||
import moe.nea.firmament.features.mining.PickaxeAbility
|
import moe.nea.firmament.features.mining.PickaxeAbility
|
||||||
import moe.nea.firmament.features.mining.PristineProfitTracker
|
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.misc.Hud
|
||||||
import moe.nea.firmament.features.world.FairySouls
|
import moe.nea.firmament.features.world.FairySouls
|
||||||
import moe.nea.firmament.features.world.Waypoints
|
import moe.nea.firmament.features.world.Waypoints
|
||||||
@@ -69,6 +70,7 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
|
|||||||
loadFeature(SaveCursorPosition)
|
loadFeature(SaveCursorPosition)
|
||||||
loadFeature(PriceData)
|
loadFeature(PriceData)
|
||||||
loadFeature(Fixes)
|
loadFeature(Fixes)
|
||||||
|
loadFeature(CustomCapes)
|
||||||
loadFeature(Hud)
|
loadFeature(Hud)
|
||||||
loadFeature(WardrobeKeybinds)
|
loadFeature(WardrobeKeybinds)
|
||||||
loadFeature(DianaWaypoints)
|
loadFeature(DianaWaypoints)
|
||||||
|
|||||||
@@ -16,10 +16,22 @@ import net.minecraft.client.util.BufferAllocator
|
|||||||
import net.minecraft.client.util.SkinTextures
|
import net.minecraft.client.util.SkinTextures
|
||||||
import net.minecraft.util.Identifier
|
import net.minecraft.util.Identifier
|
||||||
import moe.nea.firmament.Firmament
|
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.MC
|
||||||
import moe.nea.firmament.util.TimeMark
|
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 {
|
interface CustomCapeRenderer {
|
||||||
fun replaceRender(
|
fun replaceRender(
|
||||||
renderLayer: RenderLayer,
|
renderLayer: RenderLayer,
|
||||||
@@ -158,7 +170,7 @@ object CustomCapes {
|
|||||||
player: AbstractClientPlayerEntity,
|
player: AbstractClientPlayerEntity,
|
||||||
playerEntityRenderState: PlayerEntityRenderState
|
playerEntityRenderState: PlayerEntityRenderState
|
||||||
) {
|
) {
|
||||||
val cape = byUuid[player.uuid]
|
val cape = if (TConfig.showCapes) byUuid[player.uuid] else null
|
||||||
val capeStorage = CapeStorage.cast(playerEntityRenderState)
|
val capeStorage = CapeStorage.cast(playerEntityRenderState)
|
||||||
if (cape == null) {
|
if (cape == null) {
|
||||||
capeStorage.cape_firmament = null
|
capeStorage.cape_firmament = null
|
||||||
|
|||||||
@@ -101,6 +101,9 @@
|
|||||||
"firmament.config.custom-skyblock-textures.skulls-enabled": "Enable Custom Placed Skull Textures",
|
"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.custom-skyblock-textures.skulls-enabled.description": "Allow replacing the textures of placed skulls.",
|
||||||
"firmament.config.developer": "Developer Settings",
|
"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": "Automatically rebuild resources",
|
||||||
"firmament.config.developer.auto-rebuild.description": "Executes ./gradlew processResources before F3+T is executed.",
|
"firmament.config.developer.auto-rebuild.description": "Executes ./gradlew processResources before F3+T is executed.",
|
||||||
"firmament.config.diana": "Diana",
|
"firmament.config.diana": "Diana",
|
||||||
|
|||||||
Reference in New Issue
Block a user