Skip to content

Commit 5940de0

Browse files
committed
First commit
0 parents  commit 5940de0

41 files changed

Lines changed: 2436 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1134 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/build_main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Java CI (Main)
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
if: |
12+
!contains(github.event.head_commit.message, '[ci skip]')
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 5
18+
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: '21'
24+
cache: gradle
25+
26+
- name: Grant execute permission for gradlew
27+
run: chmod +x gradlew
28+
29+
- name: Build with Gradle
30+
uses: gradle/gradle-build-action@v3
31+
with:
32+
arguments: build -x test --stacktrace
33+
34+
- name: Publish to latvian.dev Maven
35+
uses: gradle/gradle-build-action@v3
36+
env:
37+
MAVEN_URL: 'https://maven.latvian.dev/releases'
38+
MAVEN_USERNAME: 'lat'
39+
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
40+
with:
41+
arguments: publish --stacktrace

.gitignore

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# User-specific stuff
2+
.idea/
3+
4+
*.iml
5+
*.ipr
6+
*.iws
7+
8+
# IntelliJ
9+
out/
10+
# mpeltonen/sbt-idea plugin
11+
.idea_modules/
12+
13+
# JIRA plugin
14+
atlassian-ide-plugin.xml
15+
16+
# Compiled class file
17+
*.class
18+
19+
# Log file
20+
*.log
21+
22+
# BlueJ files
23+
*.ctxt
24+
25+
# Package Files #
26+
*.jar
27+
*.war
28+
*.nar
29+
*.ear
30+
*.zip
31+
*.tar.gz
32+
*.rar
33+
34+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
35+
hs_err_pid*
36+
37+
*~
38+
39+
# temporary files which can be created if a process still has a handle open of a deleted file
40+
.fuse_hidden*
41+
42+
# KDE directory preferences
43+
.directory
44+
45+
# Linux trash folder which might appear on any partition or disk
46+
.Trash-*
47+
48+
# .nfs files are created when an open file is removed but is still being accessed
49+
.nfs*
50+
51+
# General
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
56+
# Icon must end with two \r
57+
Icon
58+
59+
# Thumbnails
60+
._*
61+
62+
# Files that might appear in the root of a volume
63+
.DocumentRevisions-V100
64+
.fseventsd
65+
.Spotlight-V100
66+
.TemporaryItems
67+
.Trashes
68+
.VolumeIcon.icns
69+
.com.apple.timemachine.donotpresent
70+
71+
# Directories potentially created on remote AFP share
72+
.AppleDB
73+
.AppleDesktop
74+
Network Trash Folder
75+
Temporary Items
76+
.apdisk
77+
78+
# Windows thumbnail cache files
79+
Thumbs.db
80+
Thumbs.db:encryptable
81+
ehthumbs.db
82+
ehthumbs_vista.db
83+
84+
# Dump file
85+
*.stackdump
86+
87+
# Folder config file
88+
[Dd]esktop.ini
89+
90+
# Recycle Bin used on file shares
91+
$RECYCLE.BIN/
92+
93+
# Windows Installer files
94+
*.cab
95+
*.msi
96+
*.msix
97+
*.msm
98+
*.msp
99+
100+
# Windows shortcuts
101+
*.lnk
102+
103+
.gradle
104+
build/
105+
106+
# Ignore Gradle GUI config
107+
gradle-app.setting
108+
109+
# Cache of project
110+
.gradletasknamecache
111+
112+
**/build/
113+
114+
# Common working directory
115+
runs/
116+
117+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
118+
!gradle-wrapper.jar

LICENSE

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) 2024 Latvian DEV
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# KLib
2+
3+
Lots of math and data utilities

build.gradle

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
import java.time.Instant
2+
3+
plugins {
4+
id 'base'
5+
id 'java'
6+
id 'idea'
7+
id 'maven-publish'
8+
id 'net.neoforged.moddev' version "2.0.124"
9+
}
10+
11+
ext.ENV = System.getenv()
12+
def isLocal = !ENV.containsKey("GITHUB_RUN_NUMBER")
13+
14+
version = "$mod_version-${isLocal ? "local.${Instant.now().epochSecond}" : "build.${ENV.GITHUB_RUN_NUMBER}"}"
15+
group = project.maven_group
16+
base.archivesName = project.archives_base_name
17+
18+
println("Building version: $version")
19+
20+
neoForge {
21+
enable {
22+
version = project.neoforge_version
23+
validateAccessTransformers = ENV.CI != "true"
24+
disableRecompilation = ENV.CI == "true"
25+
26+
accessTransformers {
27+
publish(project.file('src/main/resources/META-INF/accesstransformer.cfg'))
28+
}
29+
30+
runs {
31+
configureEach {
32+
logLevel = org.slf4j.event.Level.INFO
33+
}
34+
35+
client {
36+
ideName = 'Client'
37+
client()
38+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
39+
40+
if (ENV.MC_CLIENT_ARGS) {
41+
programArguments.addAll(ENV.MC_CLIENT_ARGS.split(' '))
42+
}
43+
44+
jvmArguments.addAll("-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition")
45+
gameDirectory = file 'runs/client'
46+
}
47+
48+
server {
49+
ideName = 'Server'
50+
server()
51+
programArgument("--nogui")
52+
gameDirectory = file 'runs/server'
53+
}
54+
}
55+
56+
mods {
57+
mod {
58+
sourceSet sourceSets.main
59+
}
60+
}
61+
}
62+
}
63+
64+
compileJava {
65+
options.encoding = "UTF-8"
66+
options.release.set(21)
67+
options.compilerArgs << '-parameters' << '-Xmaxerrs' << '1000'
68+
}
69+
70+
java {
71+
sourceCompatibility = targetCompatibility = '21'
72+
withSourcesJar()
73+
withJavadocJar()
74+
}
75+
76+
configurations {
77+
runtimeClasspath.extendsFrom localRuntime
78+
}
79+
80+
tasks.withType(Javadoc) {
81+
options.addStringOption('Xdoclint:none', '-quiet')
82+
}
83+
84+
repositories {
85+
mavenLocal()
86+
mavenCentral()
87+
88+
maven {
89+
url "https://maven.neoforged.net/releases"
90+
}
91+
92+
maven {
93+
name = 'ParchmentMC'
94+
url = 'https://maven.parchmentmc.org'
95+
content {
96+
includeGroup "org.parchmentmc.data"
97+
}
98+
}
99+
}
100+
101+
processResources {
102+
def toReplace = [
103+
"version": project.version
104+
]
105+
106+
println("[Process Resources] Replacing properties in resources: " + toReplace)
107+
108+
inputs.properties toReplace
109+
filesMatching("META-INF/neoforge.mods.toml") {
110+
expand toReplace
111+
}
112+
}
113+
114+
jar {
115+
manifest {
116+
attributes([
117+
"Specification-Title" : project.mod_id,
118+
"Specification-Vendor" : project.mod_author,
119+
"Specification-Version" : "1",
120+
"Implementation-Title" : project.name,
121+
"Implementation-Version" : version,
122+
"Implementation-Vendor" : project.mod_author,
123+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
124+
])
125+
}
126+
}
127+
128+
publishing {
129+
publications {
130+
mavenNeoForge(MavenPublication) {
131+
artifactId = archives_base_name
132+
from components.java
133+
}
134+
}
135+
136+
repositories {
137+
if (ENV.MAVEN_URL && ENV.MAVEN_USERNAME && ENV.MAVEN_TOKEN) {
138+
maven {
139+
url = ENV.MAVEN_URL
140+
credentials {
141+
username = ENV.MAVEN_USERNAME
142+
password = ENV.MAVEN_TOKEN
143+
}
144+
}
145+
}
146+
}
147+
}
148+
149+
idea {
150+
module {
151+
if (ENV.CI != "true") {
152+
downloadSources = true
153+
downloadJavadoc = true
154+
155+
["client", "server"].each {
156+
[
157+
"config",
158+
"crash-reports",
159+
"debug",
160+
"downloads",
161+
"flashback",
162+
"local",
163+
"logs",
164+
"mods",
165+
"profilekeys",
166+
"saves",
167+
"voicechat_recordings",
168+
"command_history.txt",
169+
"options.txt",
170+
"server.properties",
171+
"world",
172+
].each { ext ->
173+
excludeDirs.add(file("runs/$it/$ext"))
174+
}
175+
}
176+
}
177+
}
178+
}

gradle.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
org.gradle.jvmargs=-Xmx3G
2+
org.gradle.daemon=false
3+
org.gradle.parallel=true
4+
5+
mod_id=betteradvancedtooltips
6+
archives_base_name=better-advanced-tooltips
7+
mod_name=Better Advanced Tooltips
8+
maven_group=dev.latvian.mods
9+
mod_author=latvian.dev
10+
11+
mod_version=2105.1.0
12+
13+
neoforge_version=21.5.96
14+
neoForge.parchment.minecraftVersion=1.21.5
15+
neoForge.parchment.mappingsVersion=2025.06.15

gradle/wrapper/gradle-wrapper.jar

60.6 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-9.2.0-all.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)