Skip to content

Commit 938845a

Browse files
committed
First commit
0 parents  commit 938845a

21 files changed

+2539
-0
lines changed

.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@v3
16+
with:
17+
fetch-depth: 30
18+
19+
- name: Set up JDK 21
20+
uses: actions/setup-java@v3
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@v2
31+
with:
32+
arguments: build -x test --stacktrace
33+
34+
- name: Publish to latvian.dev Maven
35+
uses: gradle/gradle-build-action@v2
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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# eclipse
2+
bin
3+
*.launch
4+
.settings
5+
.metadata
6+
.classpath
7+
.project
8+
9+
# idea
10+
out
11+
*.ipr
12+
*.iws
13+
*.iml
14+
.idea
15+
16+
# gradle
17+
build
18+
.gradle
19+
logs
20+
*.log
21+
22+
# other
23+
eclipse
24+
run
25+
run_server
26+
.vscode
27+
.architectury-transformer/
28+
29+
# metadata (macOS)
30+
.DS_Store
31+
32+
# metadata (windows)
33+
Thumbs.db
34+
desktop.ini

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) 2025 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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# RenderDoc Support
2+
3+
Adds runtime RenderDoc support to Minecraft without using a Process ID
4+
5+
## Downloads
6+
7+
- Mod: https://maven.latvian.dev/#/releases/dev/latvian/mods/renderdoc-support
8+
- RenderDoc: https://renderdoc.org/
9+
10+
## Installation
11+
12+
- Drop the mod in `mods` folder
13+
- If you are on Windows with default RenderDoc installation path (`C:\Program Files\RenderDoc`) then that's it
14+
- If you are on Linux or your RenderDoc path on Windows isn't the default path, you need to set the `-Djna.library.path` VM argument to RenderDoc library path
15+
16+
## Usage
17+
18+
- Open RenderDoc
19+
- Click `File` -> `Attach to Running Instance`
20+
- Select `localhost` -> `java` from the list
21+
- Capture either with `F12` in-game or `Capture Frame` button in the app

build.gradle

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
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.75"
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.archivesBaseName = project.archives_base_name
17+
18+
println("Building version: ${version}")
19+
20+
neoForge {
21+
version = project.neoforge_version
22+
23+
runs {
24+
configureEach {
25+
logLevel = org.slf4j.event.Level.INFO
26+
}
27+
28+
client {
29+
ideName = 'Client'
30+
client()
31+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
32+
33+
if (ENV.MC_CLIENT_ARGS) {
34+
programArguments.addAll(ENV.MC_CLIENT_ARGS.split(' '))
35+
}
36+
37+
jvmArguments.addAll("-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition")
38+
gameDirectory = file 'run'
39+
}
40+
41+
server {
42+
ideName = 'Server'
43+
server()
44+
programArgument("--nogui")
45+
gameDirectory = file 'run_server'
46+
}
47+
}
48+
49+
mods {
50+
preloader {
51+
sourceSet sourceSets.main
52+
}
53+
}
54+
}
55+
56+
compileJava {
57+
options.encoding = "UTF-8"
58+
options.release.set(21)
59+
options.compilerArgs << '-parameters' << '-Xmaxerrs' << '1000'
60+
}
61+
62+
java {
63+
sourceCompatibility = targetCompatibility = '21'
64+
withSourcesJar()
65+
}
66+
67+
configurations {
68+
runtimeClasspath.extendsFrom localRuntime
69+
}
70+
71+
repositories {
72+
mavenLocal()
73+
mavenCentral()
74+
75+
maven {
76+
url "https://maven.neoforged.net/releases"
77+
}
78+
79+
maven {
80+
name = 'ParchmentMC'
81+
url = 'https://maven.parchmentmc.org'
82+
content {
83+
includeGroup "org.parchmentmc.data"
84+
}
85+
}
86+
}
87+
88+
dependencies {
89+
}
90+
91+
processResources {
92+
def toReplace = [
93+
"version": project.version
94+
]
95+
96+
println("[Process Resources] Replacing properties in resources: " + toReplace)
97+
98+
inputs.properties toReplace
99+
filesMatching("META-INF/neoforge.mods.toml") {
100+
expand toReplace
101+
}
102+
}
103+
104+
jar {
105+
manifest {
106+
attributes([
107+
"Specification-Title" : project.mod_id,
108+
"Specification-Vendor" : project.mod_author,
109+
"Specification-Version" : "1",
110+
"Implementation-Title" : project.name,
111+
"Implementation-Version" : version,
112+
"Implementation-Vendor" : project.mod_author,
113+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
114+
])
115+
}
116+
}
117+
118+
publishing {
119+
publications {
120+
mavenNeoForge(MavenPublication) {
121+
artifactId = archives_base_name
122+
from components.java
123+
}
124+
}
125+
126+
repositories {
127+
if (ENV.MAVEN_URL && ENV.MAVEN_USERNAME && ENV.MAVEN_TOKEN) {
128+
maven {
129+
url = ENV.MAVEN_URL
130+
credentials {
131+
username = ENV.MAVEN_USERNAME
132+
password = ENV.MAVEN_TOKEN
133+
}
134+
}
135+
}
136+
}
137+
}
138+
139+
idea {
140+
module {
141+
downloadSources = true
142+
downloadJavadoc = true
143+
}
144+
}

gradle.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
org.gradle.jvmargs=-Xmx3G
2+
org.gradle.daemon=false
3+
org.gradle.configuration-cache=true
4+
org.gradle.parallel=true
5+
6+
mod_id=renderdocsupport
7+
archives_base_name=renderdoc-support
8+
mod_name=RenderDoc Support
9+
maven_group=dev.latvian.mods
10+
mod_author=latvian.dev
11+
12+
mod_version=1.0.0
13+
14+
neoforge_version=21.5.66-beta
15+
neoForge.parchment.minecraftVersion=1.21.5
16+
neoForge.parchment.mappingsVersion=2025.04.19

gradle/wrapper/gradle-wrapper.jar

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

0 commit comments

Comments
 (0)