Skip to content

Commit 0e3512a

Browse files
committed
Initial commit
0 parents  commit 0e3512a

File tree

20 files changed

+784
-0
lines changed

20 files changed

+784
-0
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
continuation_indent_size = 8
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.json]
14+
indent_size = 2
15+
16+
[*.yml]
17+
indent_size = 2
18+
19+
[*.gradle]
20+
indent_style = tab
21+
22+
[*.java]
23+
indent_style = tab
24+
ij_continuation_indent_size = 8
25+
ij_java_class_count_to_use_import_on_demand = 99
26+
ij_java_names_count_to_use_import_on_demand = 99
27+
ij_java_imports_layout = $*, |, java.**, |, javax.**, |, org.**, |, com.**, |, *

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
type:
8+
type: choice
9+
description: Type of build
10+
required: true
11+
options:
12+
- normal
13+
- snapshot
14+
- release
15+
default: normal
16+
17+
jobs:
18+
build:
19+
strategy:
20+
matrix:
21+
java: [ 21 ]
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Java ${{ matrix.java }}
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: 'temurin'
31+
java-version: ${{ matrix.java }}
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
36+
- name: Make Gradle Wrapper Executable
37+
run: chmod +x ./gradlew
38+
39+
- name: Build
40+
run: ./gradlew build
41+
42+
- name: Run Tests
43+
run: ./gradlew runGametest
44+
45+
- name: Publish Snapshot
46+
if: ${{ github.event.inputs.type == 'snapshot' }}
47+
run: >-
48+
./gradlew publishAllPublicationsToDevOsSnapshotsRepository
49+
-PdevOsSnapshotsUsername="${{ secrets.MAVEN_USER }}"
50+
-PdevOsSnapshotsPassword="${{ secrets.MAVEN_PASS }}"
51+
52+
- name: Publish Release
53+
if: ${{ github.event.inputs.type == 'release' }}
54+
run: >-
55+
./gradlew publishAllPublicationsToDevOsReleasesRepository
56+
-PdevOsReleasesUsername="${{ secrets.MAVEN_USER }}"
57+
-PdevOsReleasesPassword="${{ secrets.MAVEN_PASS }}"
58+
59+
- name: capture build artifacts
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: Artifacts
63+
path: build/libs/

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# gradle
2+
3+
.gradle/
4+
build/
5+
out/
6+
classes/
7+
8+
# eclipse
9+
10+
*.launch
11+
12+
# idea
13+
14+
.idea/
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# vscode
20+
21+
.settings/
22+
.vscode/
23+
bin/
24+
.classpath
25+
.project
26+
27+
# macos
28+
29+
*.DS_Store
30+
31+
# fabric
32+
33+
run/

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 devOS: Sanity Edition, Team Nautical
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Sheared
2+
3+
![Mod icon](src/main/resources/assets/sheared/icon.png)
4+
5+
Shear your sheep in more ways than one!
6+
7+
This mod makes it so a random shear transformation is applied to 20% of sheared sheep. This mod is client-only, but different players on a server will see the same transformation on the same sheep.

build.gradle.kts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// versions
2+
val minecraftVersion = "1.21.1"
3+
val minecraftDep = "=1.21.1"
4+
// https://parchmentmc.org/docs/getting-started
5+
val parchmentVersion = "2024.11.17"
6+
// https://fabricmc.net/develop
7+
val loaderVersion = "0.16.14"
8+
9+
// buildscript
10+
plugins {
11+
id("fabric-loom") version "1.11.+"
12+
id("maven-publish")
13+
}
14+
15+
base.archivesName = "sheared"
16+
group = "one.devos.nautical"
17+
18+
val buildNum = providers.environmentVariable("GITHUB_RUN_NUMBER")
19+
.filter(String::isNotEmpty)
20+
.map { "build.$it" }
21+
.orElse("local")
22+
.get()
23+
24+
version = "1.0.0+mc$minecraftVersion.$buildNum"
25+
26+
repositories {
27+
maven("https://maven.parchmentmc.org")
28+
maven("https://api.modrinth.com/maven")
29+
}
30+
31+
dependencies {
32+
// dev environment
33+
minecraft("com.mojang:minecraft:$minecraftVersion")
34+
mappings(loom.layered {
35+
officialMojangMappings { nameSyntheticMembers = false }
36+
parchment("org.parchmentmc.data:parchment-$minecraftVersion:$parchmentVersion@zip")
37+
})
38+
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
39+
}
40+
41+
tasks.withType(ProcessResources::class) {
42+
val properties: Map<String, Any> = mapOf(
43+
"version" to version,
44+
"minecraft_dependency" to minecraftDep
45+
)
46+
47+
inputs.properties(properties)
48+
49+
filesMatching("fabric.mod.json") {
50+
expand(properties)
51+
}
52+
}
53+
54+
java {
55+
withSourcesJar()
56+
}
57+
58+
publishing {
59+
publications {
60+
register<MavenPublication>("mavenJava") {
61+
from(components["java"])
62+
}
63+
}
64+
65+
repositories {
66+
maven("https://mvn.devos.one/snapshots") {
67+
name = "devOsSnapshots"
68+
credentials(PasswordCredentials::class)
69+
}
70+
maven("https://mvn.devos.one/releases") {
71+
name = "devOsReleases"
72+
credentials(PasswordCredentials::class)
73+
}
74+
}
75+
}

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
org.gradle.jvmargs=-Xmx2G
2+
org.gradle.parallel=true
3+
org.gradle.caching=true
4+
org.gradle.configuration-cache=true

gradle/wrapper/gradle-wrapper.jar

42.7 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)