···11+#
22+# https://help.github.com/articles/dealing-with-line-endings/
33+#
44+# Linux start script should use lf
55+/gradlew text eol=lf
66+77+# These are Windows script files and should use crlf
88+*.bat text eol=crlf
99+
+30
.github/workflows/build.yml
···11+# Automatically build the project and run any configured tests for every push
22+# and submitted pull request. This can help catch issues that only occur on
33+# certain platforms or Java versions, and provides a first line of defence
44+# against bad commits.
55+66+name: build
77+on: [pull_request, push]
88+99+jobs:
1010+ build:
1111+ runs-on: ubuntu-24.04
1212+ steps:
1313+ - name: checkout repository
1414+ uses: actions/checkout@v4
1515+ - name: validate gradle wrapper
1616+ uses: gradle/actions/wrapper-validation@v4
1717+ - name: setup jdk
1818+ uses: actions/setup-java@v4
1919+ with:
2020+ java-version: '21'
2121+ distribution: 'microsoft'
2222+ - name: make gradle wrapper executable
2323+ run: chmod +x ./gradlew
2424+ - name: build
2525+ run: ./gradlew build
2626+ - name: capture build artifacts
2727+ uses: actions/upload-artifact@v4
2828+ with:
2929+ name: Artifacts
3030+ path: build/libs/
···11+Creative Commons Legal Code
22+33+CC0 1.0 Universal
44+55+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
66+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
77+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
88+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
99+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
1010+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
1111+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
1212+ HEREUNDER.
1313+1414+Statement of Purpose
1515+1616+The laws of most jurisdictions throughout the world automatically confer
1717+exclusive Copyright and Related Rights (defined below) upon the creator
1818+and subsequent owner(s) (each and all, an "owner") of an original work of
1919+authorship and/or a database (each, a "Work").
2020+2121+Certain owners wish to permanently relinquish those rights to a Work for
2222+the purpose of contributing to a commons of creative, cultural and
2323+scientific works ("Commons") that the public can reliably and without fear
2424+of later claims of infringement build upon, modify, incorporate in other
2525+works, reuse and redistribute as freely as possible in any form whatsoever
2626+and for any purposes, including without limitation commercial purposes.
2727+These owners may contribute to the Commons to promote the ideal of a free
2828+culture and the further production of creative, cultural and scientific
2929+works, or to gain reputation or greater distribution for their Work in
3030+part through the use and efforts of others.
3131+3232+For these and/or other purposes and motivations, and without any
3333+expectation of additional consideration or compensation, the person
3434+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
3535+is an owner of Copyright and Related Rights in the Work, voluntarily
3636+elects to apply CC0 to the Work and publicly distribute the Work under its
3737+terms, with knowledge of his or her Copyright and Related Rights in the
3838+Work and the meaning and intended legal effect of CC0 on those rights.
3939+4040+1. Copyright and Related Rights. A Work made available under CC0 may be
4141+protected by copyright and related or neighboring rights ("Copyright and
4242+Related Rights"). Copyright and Related Rights include, but are not
4343+limited to, the following:
4444+4545+ i. the right to reproduce, adapt, distribute, perform, display,
4646+ communicate, and translate a Work;
4747+ ii. moral rights retained by the original author(s) and/or performer(s);
4848+iii. publicity and privacy rights pertaining to a person's image or
4949+ likeness depicted in a Work;
5050+ iv. rights protecting against unfair competition in regards to a Work,
5151+ subject to the limitations in paragraph 4(a), below;
5252+ v. rights protecting the extraction, dissemination, use and reuse of data
5353+ in a Work;
5454+ vi. database rights (such as those arising under Directive 96/9/EC of the
5555+ European Parliament and of the Council of 11 March 1996 on the legal
5656+ protection of databases, and under any national implementation
5757+ thereof, including any amended or successor version of such
5858+ directive); and
5959+vii. other similar, equivalent or corresponding rights throughout the
6060+ world based on applicable law or treaty, and any national
6161+ implementations thereof.
6262+6363+2. Waiver. To the greatest extent permitted by, but not in contravention
6464+of, applicable law, Affirmer hereby overtly, fully, permanently,
6565+irrevocably and unconditionally waives, abandons, and surrenders all of
6666+Affirmer's Copyright and Related Rights and associated claims and causes
6767+of action, whether now known or unknown (including existing as well as
6868+future claims and causes of action), in the Work (i) in all territories
6969+worldwide, (ii) for the maximum duration provided by applicable law or
7070+treaty (including future time extensions), (iii) in any current or future
7171+medium and for any number of copies, and (iv) for any purpose whatsoever,
7272+including without limitation commercial, advertising or promotional
7373+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
7474+member of the public at large and to the detriment of Affirmer's heirs and
7575+successors, fully intending that such Waiver shall not be subject to
7676+revocation, rescission, cancellation, termination, or any other legal or
7777+equitable action to disrupt the quiet enjoyment of the Work by the public
7878+as contemplated by Affirmer's express Statement of Purpose.
7979+8080+3. Public License Fallback. Should any part of the Waiver for any reason
8181+be judged legally invalid or ineffective under applicable law, then the
8282+Waiver shall be preserved to the maximum extent permitted taking into
8383+account Affirmer's express Statement of Purpose. In addition, to the
8484+extent the Waiver is so judged Affirmer hereby grants to each affected
8585+person a royalty-free, non transferable, non sublicensable, non exclusive,
8686+irrevocable and unconditional license to exercise Affirmer's Copyright and
8787+Related Rights in the Work (i) in all territories worldwide, (ii) for the
8888+maximum duration provided by applicable law or treaty (including future
8989+time extensions), (iii) in any current or future medium and for any number
9090+of copies, and (iv) for any purpose whatsoever, including without
9191+limitation commercial, advertising or promotional purposes (the
9292+"License"). The License shall be deemed effective as of the date CC0 was
9393+applied by Affirmer to the Work. Should any part of the License for any
9494+reason be judged legally invalid or ineffective under applicable law, such
9595+partial invalidity or ineffectiveness shall not invalidate the remainder
9696+of the License, and in such case Affirmer hereby affirms that he or she
9797+will not (i) exercise any of his or her remaining Copyright and Related
9898+Rights in the Work or (ii) assert any associated claims and causes of
9999+action with respect to the Work, in either case contrary to Affirmer's
100100+express Statement of Purpose.
101101+102102+4. Limitations and Disclaimers.
103103+104104+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
105105+ surrendered, licensed or otherwise affected by this document.
106106+ b. Affirmer offers the Work as-is and makes no representations or
107107+ warranties of any kind concerning the Work, express, implied,
108108+ statutory or otherwise, including without limitation warranties of
109109+ title, merchantability, fitness for a particular purpose, non
110110+ infringement, or the absence of latent or other defects, accuracy, or
111111+ the present or absence of errors, whether or not discoverable, all to
112112+ the greatest extent permissible under applicable law.
113113+ c. Affirmer disclaims responsibility for clearing rights of other persons
114114+ that may apply to the Work or any use thereof, including without
115115+ limitation any person's Copyright and Related Rights in the Work.
116116+ Further, Affirmer disclaims responsibility for obtaining any necessary
117117+ consents, permissions or other rights required for any use of the
118118+ Work.
119119+ d. Affirmer understands and acknowledges that Creative Commons is not a
120120+ party to this document and has no duty or obligation with respect to
121121+ this CC0 or use of the Work.
+97
build.gradle
···11+plugins {
22+ id 'net.fabricmc.fabric-loom-remap' version "${loom_version}"
33+ id 'maven-publish'
44+ id "org.jetbrains.kotlin.jvm" version "2.3.0"
55+}
66+77+version = project.mod_version
88+group = project.maven_group
99+1010+base {
1111+ archivesName = project.archives_base_name
1212+}
1313+1414+repositories {
1515+ // Add repositories to retrieve artifacts from in here.
1616+ // You should only use this when depending on other mods because
1717+ // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
1818+ // See https://docs.gradle.org/current/userguide/declaring_repositories.html
1919+ // for more information about repositories.
2020+}
2121+2222+loom {
2323+ splitEnvironmentSourceSets()
2424+2525+ mods {
2626+ "atproto-connect" {
2727+ sourceSet sourceSets.main
2828+ sourceSet sourceSets.client
2929+ }
3030+ }
3131+3232+}
3333+3434+dependencies {
3535+ // To change the versions see the gradle.properties file
3636+ minecraft "com.mojang:minecraft:${project.minecraft_version}"
3737+ mappings loom.officialMojangMappings()
3838+ modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
3939+4040+ // Fabric API. This is technically optional, but you probably want it anyway.
4141+ modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
4242+ modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
4343+}
4444+4545+processResources {
4646+ inputs.property "version", project.version
4747+4848+ filesMatching("fabric.mod.json") {
4949+ expand "version": inputs.properties.version
5050+ }
5151+}
5252+5353+tasks.withType(JavaCompile).configureEach {
5454+ it.options.release = 21
5555+}
5656+5757+tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
5858+ kotlinOptions {
5959+ jvmTarget = 21
6060+ }
6161+}
6262+6363+java {
6464+ // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
6565+ // if it is present.
6666+ // If you remove this line, sources will not be generated.
6767+ withSourcesJar()
6868+6969+ sourceCompatibility = JavaVersion.VERSION_21
7070+ targetCompatibility = JavaVersion.VERSION_21
7171+}
7272+7373+jar {
7474+ inputs.property "archivesName", project.base.archivesName
7575+7676+ from("LICENSE") {
7777+ rename { "${it}_${inputs.properties.archivesName}"}
7878+ }
7979+}
8080+8181+// configure the maven publication
8282+publishing {
8383+ publications {
8484+ create("mavenJava", MavenPublication) {
8585+ artifactId = project.archives_base_name
8686+ from components.java
8787+ }
8888+ }
8989+9090+ // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
9191+ repositories {
9292+ // Add repositories to publish to here.
9393+ // Notice: This block does NOT have the same function as the block in the top level.
9494+ // The repositories here will be used for publishing your artifact, not for
9595+ // retrieving dependencies.
9696+ }
9797+}
+21
gradle.properties
···11+# Done to increase the memory available to gradle.
22+org.gradle.jvmargs=-Xmx1G
33+org.gradle.parallel=true
44+55+# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
66+org.gradle.configuration-cache=false
77+88+# Fabric Properties
99+# check these on https://fabricmc.net/develop
1010+minecraft_version=1.21.10
1111+loader_version=0.18.3
1212+loom_version=1.14-SNAPSHOT
1313+fabric_kotlin_version=1.13.8+kotlin.2.3.0
1414+1515+# Mod Properties
1616+mod_version=1.0.0
1717+maven_group=com.jollywhoppers
1818+archives_base_name=atproto-connect
1919+2020+# Dependencies
2121+fabric_version=0.138.4+1.21.10
···11+@rem
22+@rem Copyright 2015 the original author or authors.
33+@rem
44+@rem Licensed under the Apache License, Version 2.0 (the "License");
55+@rem you may not use this file except in compliance with the License.
66+@rem You may obtain a copy of the License at
77+@rem
88+@rem https://www.apache.org/licenses/LICENSE-2.0
99+@rem
1010+@rem Unless required by applicable law or agreed to in writing, software
1111+@rem distributed under the License is distributed on an "AS IS" BASIS,
1212+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313+@rem See the License for the specific language governing permissions and
1414+@rem limitations under the License.
1515+@rem
1616+@rem SPDX-License-Identifier: Apache-2.0
1717+@rem
1818+1919+@if "%DEBUG%"=="" @echo off
2020+@rem ##########################################################################
2121+@rem
2222+@rem Gradle startup script for Windows
2323+@rem
2424+@rem ##########################################################################
2525+2626+@rem Set local scope for the variables with windows NT shell
2727+if "%OS%"=="Windows_NT" setlocal
2828+2929+set DIRNAME=%~dp0
3030+if "%DIRNAME%"=="" set DIRNAME=.
3131+@rem This is normally unused
3232+set APP_BASE_NAME=%~n0
3333+set APP_HOME=%DIRNAME%
3434+3535+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
3636+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
3737+3838+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
3939+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
4040+4141+@rem Find java.exe
4242+if defined JAVA_HOME goto findJavaFromJavaHome
4343+4444+set JAVA_EXE=java.exe
4545+%JAVA_EXE% -version >NUL 2>&1
4646+if %ERRORLEVEL% equ 0 goto execute
4747+4848+echo. 1>&2
4949+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
5050+echo. 1>&2
5151+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
5252+echo location of your Java installation. 1>&2
5353+5454+goto fail
5555+5656+:findJavaFromJavaHome
5757+set JAVA_HOME=%JAVA_HOME:"=%
5858+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5959+6060+if exist "%JAVA_EXE%" goto execute
6161+6262+echo. 1>&2
6363+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
6464+echo. 1>&2
6565+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
6666+echo location of your Java installation. 1>&2
6767+6868+goto fail
6969+7070+:execute
7171+@rem Setup the command line
7272+7373+7474+7575+@rem Execute Gradle
7676+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7777+7878+:end
7979+@rem End local scope for the variables with windows NT shell
8080+if %ERRORLEVEL% equ 0 goto mainEnd
8181+8282+:fail
8383+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8484+rem the _cmd.exe /c_ return code!
8585+set EXIT_CODE=%ERRORLEVEL%
8686+if %EXIT_CODE% equ 0 set EXIT_CODE=1
8787+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
8888+exit /b %EXIT_CODE%
8989+9090+:mainEnd
9191+if "%OS%"=="Windows_NT" endlocal
9292+9393+:omega
···11+package com.jollywhoppers
22+33+import net.fabricmc.api.ClientModInitializer
44+55+object AtprotoconnectClient : ClientModInitializer {
66+ override fun onInitializeClient() {
77+ // This entrypoint is suitable for setting up client-specific logic, such as rendering.
88+ }
99+}
···11+package com.jollywhoppers
22+33+import net.fabricmc.api.ModInitializer
44+import org.slf4j.LoggerFactory
55+66+object Atprotoconnect : ModInitializer {
77+ private val logger = LoggerFactory.getLogger("atproto-connect")
88+99+ override fun onInitialize() {
1010+ // This code runs as soon as Minecraft is in a mod-load-ready state.
1111+ // However, some things (like resources) may still be uninitialized.
1212+ // Proceed with mild caution.
1313+ logger.info("Hello Fabric world!")
1414+ }
1515+}