Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
78bbe8f
feat: 1.21.10, well, kinda... sorta!
worldwidepixel Nov 19, 2025
0d5602e
feat: Initial port to 1.21.10, start on implementing Greenhouse Config.
ChrysanthCow Jan 12, 2026
ffb9956
fix: Component from replace all to text.
ChrysanthCow Jan 12, 2026
3fd8dab
[skip ci] fix: ScreenShotListWidget can now be interacted with.
ChrysanthCow Jan 12, 2026
8a0d186
[skip ci] fix: ScreenshotListWidget's incorrect rendering of lists.
ChrysanthCow Jan 13, 2026
3b66cbd
[skip ci] feat: Adjust margins of ScreenshotViewerScreen so screensho…
ChrysanthCow Jan 13, 2026
af13d3d
[skip ci] fix: Fix scroll overflow.
ChrysanthCow Jan 13, 2026
84256d3
[skip ci] chore: Add ChrysanthCow to contributors.
ChrysanthCow Jan 13, 2026
ba3973a
[skip ci] fix: Remove broken getEntryAtPosition method.
ChrysanthCow Jan 14, 2026
c59d95e
[skip ci] feat: Revert Snapper width changes.
ChrysanthCow Jan 15, 2026
10cdc8b
[skpi ci]refactor: Config refactors.
ChrysanthCow Jan 19, 2026
c836407
[skip ci]refactor: Update Greenhouse Config maven name.
ChrysanthCow Jan 20, 2026
51f012d
[skip ci]docs: Update comments.
ChrysanthCow Jan 20, 2026
3adf76b
feat: Use Greenhouse Maven Snapshots for Greenhouse Config.
ChrysanthCow Jan 20, 2026
306e74d
chore: Update to Greenhouse Config 3.0.0-alpha.2.
ChrysanthCow Jan 25, 2026
3a3a3bb
feat: Update config data version schema.
ChrysanthCow Jan 25, 2026
4e7f81c
feat: Update to Greenhouse Config 3.0.0-alpha.4, modify mod version t…
ChrysanthCow Jan 26, 2026
330c939
chore: Update to Greenhouse Config 3.0.0-beta.1
ChrysanthCow Mar 1, 2026
919e696
Merge pull request #67 from ChrysanthCow/feat/1.21.10/greenhouse-config
worldwidepixel Mar 1, 2026
7517c2d
fix: update ghc and build.gradle.kts
CallMeEchoCodes Mar 2, 2026
354f37e
feat: config screen
CallMeEchoCodes Mar 3, 2026
edad56c
fix: correctly apply keyboard input in `ScreenshotScreen`
CallMeEchoCodes Mar 3, 2026
4847210
chore: fix a few weird things with platform detection
CallMeEchoCodes Mar 5, 2026
b4a3560
fix(terms): actually apply privacy policy screen option
CallMeEchoCodes Mar 5, 2026
e55aa38
fix: more config bugs
CallMeEchoCodes Mar 5, 2026
c150b3f
feat(config): modmenu compat
CallMeEchoCodes Mar 5, 2026
00aa9e3
fix(upload): change uuid codec used for auth to accept strings
CallMeEchoCodes Mar 5, 2026
682dbc6
fix: fix hell mode
CallMeEchoCodes Mar 5, 2026
f5ce14a
chore: rename some classes, fix some sync issues with config
CallMeEchoCodes Mar 6, 2026
281ea8b
fix(grid): fix scrollbar math
CallMeEchoCodes Mar 6, 2026
a5641f7
chore: add German translations
Kilip1000 Mar 8, 2026
73a6e07
chore: small cleanups
CallMeEchoCodes Mar 9, 2026
95ff273
chore: use MOD_ID instead of hardcoding
Kilip1000 Mar 9, 2026
baf5745
feat: make metadata translatable
Kilip1000 Mar 9, 2026
5fe0e61
chore: update German translations
Kilip1000 Mar 9, 2026
1238429
feat: fix truncation and screenshot loading
CallMeEchoCodes Mar 13, 2026
36fb1ca
fix: tiny truncation fix
CallMeEchoCodes Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 106 additions & 63 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,92 +1,135 @@
plugins {
java
alias(libs.plugins.fabric.loom)
alias(libs.plugins.minotaur)
}
java

class ModInfo {
val id = property("mod.id").toString()
val group = property("mod.group").toString()
val version = property("mod.version").toString()
alias(libs.plugins.fabric.loom)
alias(libs.plugins.modpublish)
}

val mod = ModInfo()
val mappingsAttribute = Attribute.of("net.minecraft.mappings", String::class.java)!!

version = "${mod.version}+${libs.versions.minecraft.get()}"
group = mod.group
val modVersion = "1.1.1"
val modId = "snapper"
val modName = "Snapper"

base.archivesName = mod.id
val modrinthProject = "snapper"
val githubRepository = "SpiritGameStudios/Snapper"

loom {
splitEnvironmentSourceSets()
group = "dev.spiritstudios"
base.archivesName = modId

mods.create(mod.id) {
sourceSet(sourceSets["main"])
sourceSet(sourceSets["client"])
}
version = "$modVersion+${libs.versions.minecraft.get()}"

accessWidenerPath = file("src/main/resources/snapper.accesswidener")
@Suppress("UnstableApiUsage")
repositories {
maven("https://maven.parchmentmc.org/") {
name = "ParchmentMC"
content { includeGroupAndSubgroups("org.parchmentmc") }
}

maven("https://maven.terraformersmc.com/") {
name = "Terraformers"
content { includeGroupAndSubgroups("com.terraformersmc") }
}

maven("https://moehreag.duckdns.org/maven/releases/") {
name = "AxolotlClient Releases"
content { includeGroupAndSubgroups("io.github.axolotlclient") }
}

maven("https://maven.greenhouse.lgbt/releases/") {
name = "Greenhouse Releases"
content { includeGroupAndSubgroups("lgbt.greenhouse") }
}

maven("https://maven.greenhouse.lgbt/snapshots/") {
name = "Greenhouse Snapshots"
content { includeGroupAndSubgroups("lgbt.greenhouse") }
}

mavenCentral()
}

repositories {
mavenCentral()
maven("https://maven.spiritstudios.dev/releases/")
maven("https://moehreag.duckdns.org/maven/releases") {
content {
includeGroup("io.github.axolotlclient.AxolotlClient")
includeGroup("io.github.axolotlclient.AxolotlClient-config")
}
}
loom {
runtimeOnlyLog4j = true

splitEnvironmentSourceSets()

mods.create(modId) {
sourceSet(sourceSets["main"])
sourceSet(sourceSets["client"])
}

accessWidenerPath = file("src/main/resources/snapper.classtweaker")
}

dependencies {
minecraft(libs.minecraft)
mappings(variantOf(libs.yarn) { classifier("v2") })
modImplementation(libs.fabric.loader)
minecraft(libs.minecraft)
@Suppress("UnstableApiUsage")
mappings(
loom.layered {
officialMojangMappings()
parchment(libs.parchment)
}
)

modImplementation(libs.fabric.loader)
modImplementation(libs.fabric.api)

modCompileOnlyApi(libs.greenhouse.config.api) {
attributes { attribute(mappingsAttribute, "intermediary") }
}

modImplementation(libs.fabric.api)
modRuntimeOnly(libs.greenhouse.config)
include(libs.greenhouse.config)

include(libs.bundles.specter)
modImplementation(libs.bundles.specter)
modCompileOnly(libs.modmenu)

implementation(libs.objc.bridge)
implementation(libs.objc.bridge)
}

tasks.processResources {
val map = mapOf(
"mod_id" to mod.id,
"mod_version" to mod.version,
"fabric_loader_version" to libs.versions.fabric.loader.get(),
"minecraft_version" to libs.versions.minecraft.get()
)

inputs.properties(map)
filesMatching("fabric.mod.json") { expand(map) }
val map = mapOf(
"version" to modVersion,
"loader_version" to libs.versions.fabric.loader.get()
)

inputs.properties(map)

filesMatching("fabric.mod.json") { expand(map) }
}

java {
withSourcesJar()
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release = 21
options.encoding = "UTF-8"
options.release = 21
}

tasks.jar { from("LICENSE") { rename { "${it}_${base.archivesName.get()}" } } }

modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set(mod.id)
versionNumber.set(mod.version)
uploadFile.set(tasks.remapJar)
gameVersions.addAll(libs.versions.minecraft.get(), "1.21.8")
loaders.addAll("fabric", "quilt")
syncBodyFrom.set(rootProject.file("README.md").readText())
dependencies {
required.version("fabric-api", libs.versions.fabric.api.get())
}
}
tasks.jar {
from("LICENSE") { rename { "${it}_$modId" } }
}

publishMods {
file = tasks.remapJar.get().archiveFile
modLoaders.add("fabric")

version = modVersion
type = STABLE
displayName = "$modName $modVersion for Minecraft ${libs.versions.minecraft.get()}"

modrinth {
accessToken = providers.gradleProperty("secrets.modrinth_token")
projectId = modrinthProject
minecraftVersions.add(libs.versions.minecraft.get())

projectDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText

requires("fabric-api")
embeds("greenhouse-config")
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

mod.version = 1.1
mod.group = dev.spiritstudios
mod.id = snapper
# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
# If you really want to use this, it may work on some tasks if you set "Shorten command line" in your InteliJ run configuration to "none".
org.gradle.configuration-cache=false
38 changes: 16 additions & 22 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
[versions]
fabric_loom = "1.11-SNAPSHOT"
minotaur = "2.+"
fabric_loom = "1.15-SNAPSHOT"
modpublish = "1.1.0"

minecraft = "1.21.8"
yarn = "1.21.8+build.1"
minecraft = "1.21.10"
parchment = "2025.10.12"

fabric_loader = "0.17.2"
fabric_api = "0.133.4+1.21.8"
fabric_loader = "0.18.1"
fabric_api = "0.138.3+1.21.10"

greenhouse_config = "3.0.0-beta.4+1.21.10"
modmenu = "16.0.0"

specter = "1.3.0"
objc_bridge = "1.0.0"

[plugins]
fabric_loom = { id = "fabric-loom", version.ref = "fabric_loom" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
fabric_loom = { id = "net.fabricmc.fabric-loom-remap", version.ref = "fabric_loom" }
modpublish = { id = "me.modmuss50.mod-publish-plugin", version.ref = "modpublish" }

[libraries]
minecraft = { group = "mojang", name = "minecraft", version.ref = "minecraft" }
yarn = { group = "net.fabricmc", name = "yarn", version.ref = "yarn" }
parchment = { group = "org.parchmentmc.data", name = "parchment-1.21.10", version.ref = "parchment" }

fabric_loader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabric_loader" }
fabric_api = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.ref = "fabric_api" }

specter_config = { group = "dev.spiritstudios.specter", name = "config", version.ref = "specter" }
specter_core = { group = "dev.spiritstudios.specter", name = "core", version.ref = "specter" }
specter_serialization = { group = "dev.spiritstudios.specter", name = "serialization", version.ref = "specter" }
specter_gui = { group = "dev.spiritstudios.specter", name = "gui", version.ref = "specter" }
greenhouse_config_api = { group = "lgbt.greenhouse.config", name = "greenhouse-config-api", version.ref = "greenhouse_config" }
greenhouse_config = { group = "lgbt.greenhouse.config", name = "greenhouse-config-fabric", version.ref = "greenhouse_config" }

objc_bridge = { group = "ca.weblite", name = "java-objc-bridge", version.ref = "objc_bridge" }
modmenu = { group = "com.terraformersmc", name = "modmenu", version.ref = "modmenu" }

[bundles]
specter = [
"specter_serialization",
"specter_core",
"specter_config",
"specter_gui"
]
objc_bridge = { group = "ca.weblite", name = "java-objc-bridge", version.ref = "objc_bridge" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
28 changes: 6 additions & 22 deletions src/client/java/dev/spiritstudios/snapper/Snapper.java
Original file line number Diff line number Diff line change
@@ -1,40 +1,24 @@
package dev.spiritstudios.snapper;

import dev.spiritstudios.snapper.util.PlatformHelper;
import dev.spiritstudios.snapper.util.actions.GeneralPlatformActions;
import dev.spiritstudios.snapper.util.actions.MacPlatformActions;
import dev.spiritstudios.snapper.util.config.DirectoryConfigUtil;
import dev.spiritstudios.snapper.util.uploading.ScreenshotUploading;
import dev.spiritstudios.specter.api.config.client.ConfigScreenWidgets;
import dev.spiritstudios.specter.api.config.client.ModMenuHelper;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.util.Identifier;
import net.minecraft.resources.ResourceLocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.file.Path;

public final class Snapper implements ClientModInitializer {
public static final String MODID = "snapper";
public static final Logger LOGGER = LoggerFactory.getLogger(MODID);
public static final String MOD_ID = "snapper";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

@Override
public void onInitializeClient() {
ConfigScreenWidgets.add(Path.class, DirectoryConfigUtil.PATH_WIDGET_FACTORY);
SnapperConfig.init();
SnapperKeybindings.init();

ModMenuHelper.addConfig(Snapper.MODID, SnapperConfig.HOLDER.id());

ClientLifecycleEvents.CLIENT_STOPPING.register(client -> ScreenshotUploading.close());
}

public static Identifier id(String path) {
return Identifier.of(MODID, path);
}

public static PlatformHelper getPlatformHelper() {
return MinecraftClient.IS_SYSTEM_MAC ? new MacPlatformActions() : new GeneralPlatformActions();
public static ResourceLocation id(String path) {
return ResourceLocation.fromNamespaceAndPath(MOD_ID, path);
}
}
Loading
Loading