Skip to content

Commit 2bfe25b

Browse files
committed
Initial release
0 parents  commit 2bfe25b

29 files changed

Lines changed: 1603 additions & 0 deletions

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
fetch-tags: true
14+
15+
- name: Setup JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
20+
21+
- name: Setup Gradle
22+
uses: gradle/actions/setup-gradle@v4
23+
24+
- name: Make gradlew executable
25+
run: chmod +x ./gradlew
26+
27+
- name: Build with Gradle
28+
run: ./gradlew build
29+
30+
- name: Upload built jar
31+
uses: actions/upload-artifact@v4
32+
if: always()
33+
with:
34+
name: jar
35+
path: '**/build/libs/'

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
20+
# other
21+
eclipse
22+
run
23+
runs
24+
run-data
25+
26+
repo

LICENSE

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

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ROTP Addon Template
2+
> This is a template repository for creating addons for the [Ripples of The Past](https://github.com/StandoByte/Ripples-Of-The-Past-Kiwami)
3+
4+
## License
5+
[GNU GPL v3.0](https://choosealicense.com/licenses/gpl-3.0/)

build.gradle

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
plugins {
2+
id 'java-library'
3+
id 'maven-publish'
4+
id 'net.neoforged.moddev' version '2.0.105'
5+
id 'idea'
6+
}
7+
8+
tasks.named('wrapper', Wrapper).configure {
9+
distributionType = Wrapper.DistributionType.BIN
10+
}
11+
12+
version = mod_version
13+
group = mod_group_id
14+
15+
repositories {
16+
mavenLocal()
17+
mavenCentral()
18+
}
19+
20+
base {
21+
archivesName = mod_name
22+
}
23+
24+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
25+
26+
neoForge {
27+
version = project.neo_version
28+
29+
parchment {
30+
mappingsVersion = project.parchment_mappings_version
31+
minecraftVersion = project.parchment_minecraft_version
32+
}
33+
34+
accessTransformers = project.files('src/main/resources/META-INF/accesstransformer.cfg')
35+
36+
runs {
37+
client {
38+
client()
39+
40+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
41+
}
42+
43+
server {
44+
server()
45+
46+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
47+
}
48+
49+
gameTestServer {
50+
type = "gameTestServer"
51+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
52+
}
53+
54+
data {
55+
data()
56+
57+
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
58+
}
59+
60+
configureEach {
61+
systemProperty 'forge.logging.markers', 'REGISTRIES'
62+
logLevel = org.slf4j.event.Level.DEBUG
63+
}
64+
}
65+
66+
mods {
67+
// define mod <-> source bindings
68+
// these are used to tell the game which sources are for which mod
69+
// multi mod projects should define one per mod
70+
"${mod_id}" {
71+
sourceSet(sourceSets.main)
72+
}
73+
}
74+
}
75+
76+
// Include resources generated by data generators.
77+
sourceSets.main.resources { srcDir 'src/generated/resources' }
78+
79+
// Sets up a dependency configuration called 'localRuntime'.
80+
// This configuration should be used instead of 'runtimeOnly' to declare
81+
// a dependency that will be present for runtime testing but that is
82+
// "optional", meaning it will not be pulled by dependents of this mod.
83+
configurations {
84+
runtimeClasspath.extendsFrom localRuntime
85+
}
86+
87+
repositories {
88+
maven {
89+
name "Unofficial RotP Maven"
90+
url "https://raw.githubusercontent.com/BestOrganizationOfCreatingROTPContent/1.21-maven/main"
91+
92+
metadataSources {
93+
mavenPom()
94+
artifact()
95+
}
96+
}
97+
}
98+
99+
dependencies {
100+
implementation "net.neoforged:neoforge:${neo_version}"
101+
implementation "com.github.standobyte.jojo_ripples:RipplesOfThePast-NeoForge-1.21.1:1.21.1-0.4-251119-b"
102+
}
103+
104+
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
105+
var replaceProperties = [
106+
minecraft_version : minecraft_version,
107+
minecraft_version_range: minecraft_version_range,
108+
neo_version : neo_version,
109+
neo_version_range : neo_version_range,
110+
loader_version_range : loader_version_range,
111+
mod_id : mod_id,
112+
mod_version : mod_version,
113+
mod_name : mod_name
114+
]
115+
inputs.properties replaceProperties
116+
expand replaceProperties
117+
from "src/main/templates"
118+
into "build/generated/sources/modMetadata"
119+
}
120+
// Include the output of "generateModMetadata" as an input directory for the build
121+
// this works with both building through Gradle and the IDE.
122+
sourceSets.main.resources.srcDir generateModMetadata
123+
// To avoid having to run "generateModMetadata" manually, make it run on every project reload
124+
neoForge.ideSyncTask generateModMetadata
125+
126+
// Example configuration to allow publishing using the maven-publish plugin
127+
publishing {
128+
publications {
129+
register('mavenJava', MavenPublication) {
130+
from components.java
131+
}
132+
}
133+
repositories {
134+
maven {
135+
url "file://${project.projectDir}/repo"
136+
}
137+
}
138+
}
139+
140+
tasks.withType(JavaCompile).configureEach {
141+
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
142+
}
143+
144+
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
145+
idea {
146+
module {
147+
downloadSources = true
148+
downloadJavadoc = true
149+
}
150+
}

gradle.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
org.gradle.jvmargs=-Xmx1G
2+
org.gradle.daemon=true
3+
org.gradle.parallel=true
4+
org.gradle.caching=true
5+
org.gradle.configuration-cache=true
6+
7+
# https://github.com/neoforged/ModDevGradle?tab=readme-ov-file#better-minecraft-parameter-names--javadoc-parchment
8+
# https://parchmentmc.org/docs/getting-started
9+
parchment_minecraft_version=1.21.1
10+
parchment_mappings_version=2024.11.17
11+
minecraft_version=1.21.1
12+
minecraft_version_range=[1.21.1]
13+
neo_version=21.1.197
14+
neo_version_range=[21.1.197,)
15+
loader_version_range=[1,)
16+
17+
mod_id=ripples_addon
18+
mod_version=0.0.0
19+
mod_group_id=com.yourname.ripples_addon
20+
mod_name=ROTP Addon Template

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)