Skip to content

Commit f8f13b2

Browse files
committed
initial commit
0 parents  commit f8f13b2

32 files changed

Lines changed: 2594 additions & 0 deletions

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable autocrlf on generated files, they always generate with LF
2+
# Add any extra files or paths here to make git stop saying they
3+
# are changed when only line endings change.
4+
src/generated/**/.cache/cache text eol=lf
5+
src/generated/**/*.json text eol=lf

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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: Build with Gradle
22+
uses: gradle/actions/setup-gradle@v3
23+
with:
24+
arguments: build

.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: 840 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AE2 Distributed Networks
2+
3+
Modern networking for ME networks.

build.gradle

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
/*
2+
* This file is derived from the NeoForged MDK at https://github.com/NeoForgeMDKs/MDK-1.21-ModDevGradle.
3+
* The license is reproduced below.
4+
*
5+
* MIT License
6+
*
7+
* Copyright (c) 2023 NeoForged project
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining a copy
10+
* of this software and associated documentation files (the "Software"), to deal
11+
* in the Software without restriction, including without limitation the rights
12+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
* copies of the Software, and to permit persons to whom the Software is
14+
* furnished to do so, subject to the following conditions:
15+
*
16+
* The above copyright notice and this permission notice shall be included in all
17+
* copies or substantial portions of the Software.
18+
*
19+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
* SOFTWARE.
26+
*/
27+
28+
plugins {
29+
id 'java-library'
30+
id 'maven-publish'
31+
id 'net.neoforged.moddev' version '2.0.88'
32+
id 'idea'
33+
}
34+
35+
tasks.named('wrapper', Wrapper).configure {
36+
// Define wrapper values here so as to not have to always do so when updating gradlew.properties.
37+
// Switching this to Wrapper.DistributionType.ALL will download the full gradle sources that comes with
38+
// documentation attached on cursor hover of gradle classes and methods. However, this comes with increased
39+
// file size for Gradle. If you do switch this to ALL, run the Gradle wrapper task twice afterwards.
40+
// (Verify by checking gradle/wrapper/gradle-wrapper.properties to see if distributionUrl now points to `-all`)
41+
distributionType = Wrapper.DistributionType.BIN
42+
}
43+
44+
version = mod_version
45+
group = mod_group_id
46+
47+
repositories {
48+
mavenLocal()
49+
mavenCentral()
50+
maven {
51+
name = "modrinth"
52+
url = "https://api.modrinth.com/maven"
53+
}
54+
maven {
55+
name = "TerraformersMC"
56+
url = "https://maven.terraformersmc.com/"
57+
}
58+
}
59+
60+
base {
61+
archivesName = mod_id
62+
}
63+
64+
// Mojang ships Java 21 to end users starting in 1.20.5, so mods should target Java 21.
65+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
66+
67+
neoForge {
68+
// Specify the version of NeoForge to use.
69+
version = project.neo_version
70+
71+
parchment {
72+
mappingsVersion = project.parchment_mappings_version
73+
minecraftVersion = project.parchment_minecraft_version
74+
}
75+
76+
validateAccessTransformers = true
77+
78+
accessTransformers {
79+
file('src/main/resources/META-INF/accesstransformer.cfg')
80+
}
81+
82+
// Default run configurations.
83+
// These can be tweaked, removed, or duplicated as needed.
84+
runs {
85+
client {
86+
client()
87+
88+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
89+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
90+
}
91+
92+
server {
93+
server()
94+
programArgument '--nogui'
95+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
96+
}
97+
98+
// This run config launches GameTestServer and runs all registered gametests, then exits.
99+
// By default, the server will crash when no gametests are provided.
100+
// The gametest system is also enabled by default for other run configs under the /test command.
101+
gameTestServer {
102+
type = "gameTestServer"
103+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
104+
}
105+
106+
data {
107+
data()
108+
109+
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
110+
// gameDirectory = project.file('run-data')
111+
112+
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
113+
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
114+
}
115+
116+
// applies to all the run configs above
117+
configureEach {
118+
// Recommended logging data for a userdev environment
119+
// The markers can be added/remove as needed separated by commas.
120+
// "SCAN": For mods scan.
121+
// "REGISTRIES": For firing of registry events.
122+
// "REGISTRYDUMP": For getting the contents of all registries.
123+
systemProperty 'forge.logging.markers', 'REGISTRIES'
124+
125+
// Recommended logging level for the console
126+
// You can set various levels here.
127+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
128+
logLevel = org.slf4j.event.Level.DEBUG
129+
}
130+
}
131+
132+
mods {
133+
// define mod <-> source bindings
134+
// these are used to tell the game which sources are for which mod
135+
// mostly optional in a single mod project
136+
// but multi mod projects should define one per mod
137+
"${mod_id}" {
138+
sourceSet(sourceSets.main)
139+
}
140+
}
141+
}
142+
143+
// Include resources generated by data generators.
144+
sourceSets.main.resources { srcDir 'src/generated/resources' }
145+
146+
// Sets up a dependency configuration called 'localRuntime'.
147+
// This configuration should be used instead of 'runtimeOnly' to declare
148+
// a dependency that will be present for runtime testing but that is
149+
// "optional", meaning it will not be pulled by dependents of this mod.
150+
configurations {
151+
runtimeClasspath.extendsFrom localRuntime
152+
}
153+
154+
dependencies {
155+
// Example optional mod dependency with JEI
156+
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
157+
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
158+
// compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"
159+
// We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
160+
// localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"
161+
162+
// Example mod dependency using a mod jar from ./libs with a flat dir repository
163+
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
164+
// The group id is ignored when searching -- in this case, it is "blank"
165+
// implementation "blank:coolmod-${mc_version}:${coolmod_version}"
166+
167+
// Example mod dependency using a file as dependency
168+
// implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")
169+
170+
// Example project dependency using a sister or child project:
171+
// implementation project(":myproject")
172+
173+
// For more info:
174+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
175+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
176+
177+
compileOnly "org.appliedenergistics:appliedenergistics2:${project.ae2_version}:api"
178+
implementation "org.appliedenergistics:appliedenergistics2:${project.ae2_version}"
179+
180+
localRuntime "dev.emi:emi-neoforge:${project.emi_version}"
181+
localRuntime "maven.modrinth:jade:${project.jade_version}"
182+
}
183+
184+
// This block of code expands all declared replace properties in the specified resource targets.
185+
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
186+
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
187+
var replaceProperties = [
188+
minecraft_version : minecraft_version,
189+
minecraft_version_range: minecraft_version_range,
190+
neo_version : neo_version,
191+
neo_version_range : neo_version_range,
192+
loader_version_range : loader_version_range,
193+
mod_id : mod_id,
194+
mod_name : mod_name,
195+
mod_license : mod_license,
196+
mod_version : mod_version,
197+
mod_authors : mod_authors,
198+
mod_description : mod_description
199+
]
200+
inputs.properties replaceProperties
201+
expand replaceProperties
202+
from "src/main/templates"
203+
into "build/generated/sources/modMetadata"
204+
}
205+
// Include the output of "generateModMetadata" as an input directory for the build
206+
// this works with both building through Gradle and the IDE.
207+
sourceSets.main.resources.srcDir generateModMetadata
208+
// To avoid having to run "generateModMetadata" manually, make it run on every project reload
209+
neoForge.ideSyncTask generateModMetadata
210+
211+
// Example configuration to allow publishing using the maven-publish plugin
212+
publishing {
213+
publications {
214+
register('mavenJava', MavenPublication) {
215+
from components.java
216+
}
217+
}
218+
repositories {
219+
maven {
220+
url "file://${project.projectDir}/repo"
221+
}
222+
}
223+
}
224+
225+
tasks.withType(JavaCompile).configureEach {
226+
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
227+
}
228+
229+
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
230+
idea {
231+
module {
232+
downloadSources = true
233+
downloadJavadoc = true
234+
}
235+
}

gradle.properties

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
org.gradle.jvmargs=-Xmx4G
3+
org.gradle.daemon=true
4+
org.gradle.parallel=true
5+
org.gradle.caching=true
6+
org.gradle.configuration-cache=true
7+
8+
# read more on this at https://github.com/neoforged/ModDevGradle?tab=readme-ov-file#better-minecraft-parameter-names--javadoc-parchment
9+
# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started
10+
parchment_minecraft_version=1.21.1
11+
parchment_mappings_version=2024.11.17
12+
# Environment Properties
13+
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
14+
# The Minecraft version must agree with the Neo version to get a valid artifact
15+
minecraft_version=1.21.1
16+
# The Minecraft version range can use any release version of Minecraft as bounds.
17+
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
18+
# as they do not follow standard versioning conventions.
19+
minecraft_version_range=[1.21.1, 1.21.2)
20+
# The Neo version must agree with the Minecraft version to get a valid artifact
21+
neo_version=21.1.172
22+
# The Neo version range can use any version of Neo as bounds
23+
neo_version_range=[21.1.0,)
24+
# The loader version range can only use the major version of FML as bounds
25+
loader_version_range=[4,)
26+
27+
ae2_version=19.2.10
28+
emi_version=1.1.22+1.21.1
29+
jade_version=15.10.0+neoforge
30+
31+
## Mod Properties
32+
33+
mod_id=ae2dn
34+
mod_name=AE2 Distributed Networks
35+
mod_license=LGPLv3
36+
mod_version=0.1.0
37+
mod_group_id=net.hellomouse.ae2dn
38+
mod_authors=Hellomouse
39+
mod_description=Enables multiple controllers in a single ME network. Bring modern network architectures into AE2.

gradle/wrapper/gradle-wrapper.jar

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

0 commit comments

Comments
 (0)