diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/Firmament.kt | 9 | ||||
-rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt | 12 | ||||
-rw-r--r-- | src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt | 10 | ||||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_0.png) | bin | 1019 -> 1019 bytes | |||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png) | bin | 4348 -> 4348 bytes | |||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png) | bin | 4766 -> 4766 bytes | |||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png) | bin | 649 -> 649 bytes | |||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png) | bin | 1396 -> 1396 bytes | |||
-rw-r--r-- | src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_1.png) | bin | 639 -> 639 bytes | |||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png) | bin | 147 -> 147 bytes | |||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png) | bin | 624 -> 624 bytes | |||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png) | bin | 203 -> 203 bytes | |||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png) | bin | 795 -> 795 bytes | |||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta (renamed from src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png.mcmeta) | 0 | ||||
-rw-r--r-- | src/main/resources/resourcepacks/transparent_storage/pack.mcmeta | 10 |
22 files changed, 24 insertions, 17 deletions
diff --git a/src/main/kotlin/Firmament.kt b/src/main/kotlin/Firmament.kt index 01905c7..f43018b 100644 --- a/src/main/kotlin/Firmament.kt +++ b/src/main/kotlin/Firmament.kt @@ -19,6 +19,8 @@ import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents +import net.fabricmc.fabric.api.resource.ResourceManagerHelper +import net.fabricmc.fabric.api.resource.ResourcePackActivationType import net.fabricmc.loader.api.FabricLoader import net.fabricmc.loader.api.Version import net.fabricmc.loader.api.metadata.ModMetadata @@ -49,6 +51,7 @@ import moe.nea.firmament.repo.RepoManager import moe.nea.firmament.util.MC import moe.nea.firmament.util.SBData import moe.nea.firmament.util.data.IDataHolder +import moe.nea.firmament.util.tr object Firmament { val modContainer by lazy { FabricLoader.getInstance().getModContainer(MOD_ID).get() } @@ -145,6 +148,12 @@ object Firmament { }) }) ClientInitEvent.publish(ClientInitEvent()) + ResourceManagerHelper.registerBuiltinResourcePack( + identifier("transparent_storage"), + modContainer, + tr("firmament.resourcepack.transparentstorage", "Transparent Firmament Storage Overlay"), + ResourcePackActivationType.NORMAL + ) } diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt index 0e3a0a8..2e807de 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlay.kt @@ -7,7 +7,6 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen import net.minecraft.entity.player.PlayerInventory import net.minecraft.item.Items import net.minecraft.network.packet.c2s.play.CloseHandledScreenC2SPacket -import net.minecraft.util.StringIdentifiable import moe.nea.firmament.annotations.Subscribe import moe.nea.firmament.events.ScreenChangeEvent import moe.nea.firmament.events.SlotClickEvent @@ -34,16 +33,6 @@ object StorageOverlay : FirmamentFeature { val inverseScroll by toggle("inverse-scroll") { false } val padding by integer("padding", 1, 20) { 5 } val margin by integer("margin", 1, 60) { 20 } - val texture by choice("texture") { StorageTexture.DEFAULT } - } - - enum class StorageTexture(val id: Int) : StringIdentifiable { - DEFAULT(0), - CLEAR(1); - - override fun asString(): String? { - return id.toString() - } } fun adjustScrollSpeed(amount: Double): Double { @@ -162,5 +151,4 @@ object StorageOverlay : FirmamentFeature { } } } - } diff --git a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt index 292850a..633a8fe 100644 --- a/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt +++ b/src/main/kotlin/features/inventory/storageoverlay/StorageOverlayScreen.kt @@ -108,12 +108,12 @@ class StorageOverlayScreen : Screen(Text.literal("")) { fun getMaxScroll() = lastRenderedInnerHeight.toFloat() - getScrollPanelInner().height - val playerInventorySprite = Identifier.of("firmament:storageoverlay/player_inventory_${StorageOverlay.TConfig.texture.asString()}") - val upperBackgroundSprite = Identifier.of("firmament:storageoverlay/upper_background_${StorageOverlay.TConfig.texture.asString()}") - val slotRowSprite = Identifier.of("firmament:storageoverlay/storage_row_${StorageOverlay.TConfig.texture.asString()}") - val scrollbarBackground = Identifier.of("firmament:storageoverlay/scroll_bar_background_${StorageOverlay.TConfig.texture.asString()}") + val playerInventorySprite = Identifier.of("firmament:storageoverlay/player_inventory") + val upperBackgroundSprite = Identifier.of("firmament:storageoverlay/upper_background") + val slotRowSprite = Identifier.of("firmament:storageoverlay/storage_row") + val scrollbarBackground = Identifier.of("firmament:storageoverlay/scroll_bar_background") val scrollbarKnob = Identifier.of("firmament:storageoverlay/scroll_bar_knob") - val controllerBackground = Identifier.of("firmament:storageoverlay/storage_controls_${StorageOverlay.TConfig.texture.asString()}") + val controllerBackground = Identifier.of("firmament:storageoverlay/storage_controls") override fun close() { isExiting = true diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_0.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png Binary files differindex 8dccb7f..8dccb7f 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_0.png +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png Binary files differindex 10a3d83..10a3d83 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png.mcmeta b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta index 94b9a1d..94b9a1d 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_0.png.mcmeta +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png Binary files differindex 97dd0ea..97dd0ea 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png.mcmeta b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta index 5964a6f..5964a6f 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_0.png.mcmeta +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png Binary files differindex 5ffc990..5ffc990 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png.mcmeta b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta index cd2857e..cd2857e 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_0.png.mcmeta +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png Binary files differindex 8362bb6..8362bb6 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png.mcmeta b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta index a29299d..a29299d 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_0.png.mcmeta +++ b/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_1.png b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png Binary files differindex 1831ef3..1831ef3 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory_1.png +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/player_inventory.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png Binary files differindex 5b774b2..5b774b2 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png.mcmeta b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta index 94b9a1d..94b9a1d 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background_1.png.mcmeta +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/scroll_bar_background.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png Binary files differindex d4852d8..d4852d8 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png.mcmeta b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta index 5964a6f..5964a6f 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls_1.png.mcmeta +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_controls.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png Binary files differindex 61e9ee5..61e9ee5 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png.mcmeta b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta index cd2857e..cd2857e 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/storage_row_1.png.mcmeta +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/storage_row.png.mcmeta diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png Binary files differindex 653a99e..653a99e 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png diff --git a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png.mcmeta b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta index a29299d..a29299d 100644 --- a/src/main/resources/assets/firmament/textures/gui/sprites/storageoverlay/upper_background_1.png.mcmeta +++ b/src/main/resources/resourcepacks/transparent_storage/assets/firmament/textures/gui/sprites/storageoverlay/upper_background.png.mcmeta diff --git a/src/main/resources/resourcepacks/transparent_storage/pack.mcmeta b/src/main/resources/resourcepacks/transparent_storage/pack.mcmeta new file mode 100644 index 0000000..c37df06 --- /dev/null +++ b/src/main/resources/resourcepacks/transparent_storage/pack.mcmeta @@ -0,0 +1,10 @@ +{ + "pack": { + "pack_format": 15, + "supported_formats": { + "min_inclusive": 15, + "max_inclusive": 2147483647 + }, + "description": "Adds a more transparent storage overlay for /firm storage" + } +} |