Skip to content

Commit 0dac91e

Browse files
committed
init
0 parents  commit 0dac91e

18 files changed

Lines changed: 1100 additions & 0 deletions

.gitignore

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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+
run/
116+
runs/
117+
118+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
119+
!gradle-wrapper.jar

build.gradle

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
plugins {
2+
id 'java-library'
3+
id 'maven-publish'
4+
id 'idea'
5+
id 'net.neoforged.moddev' version '2.0.140'
6+
}
7+
8+
version = mod_version
9+
group = mod_group_id
10+
11+
repositories {
12+
mavenLocal()
13+
mavenCentral()
14+
maven {
15+
name = "TerraformersMC"
16+
url = "https://maven.terraformersmc.com/"
17+
}
18+
}
19+
20+
base {
21+
archivesName = mod_id
22+
}
23+
24+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
25+
26+
neoForge {
27+
// Specify the version of NeoForge to use.
28+
version = project.neo_version
29+
30+
parchment {
31+
mappingsVersion = project.parchment_mappings_version
32+
minecraftVersion = project.parchment_minecraft_version
33+
}
34+
35+
// This line is optional. Access Transformers are automatically detected
36+
// accessTransformers.add('src/main/resources/META-INF/accesstransformer.cfg')
37+
38+
// Default run configurations.
39+
// These can be tweaked, removed, or duplicated as needed.
40+
runs {
41+
client {
42+
client()
43+
44+
// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
45+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
46+
}
47+
48+
server {
49+
server()
50+
programArgument '--nogui'
51+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
52+
}
53+
54+
// This run config launches GameTestServer and runs all registered gametests, then exits.
55+
// By default, the server will crash when no gametests are provided.
56+
// The gametest system is also enabled by default for other run configs under the /test command.
57+
gameTestServer {
58+
type = "gameTestServer"
59+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
60+
}
61+
62+
data {
63+
data()
64+
65+
// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
66+
// gameDirectory = project.file('run-data')
67+
68+
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
69+
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
70+
}
71+
72+
// applies to all the run configs above
73+
configureEach {
74+
// Recommended logging data for a userdev environment
75+
// The markers can be added/remove as needed separated by commas.
76+
// "SCAN": For mods scan.
77+
// "REGISTRIES": For firing of registry events.
78+
// "REGISTRYDUMP": For getting the contents of all registries.
79+
systemProperty 'forge.logging.markers', 'REGISTRIES'
80+
81+
// Recommended logging level for the console
82+
// You can set various levels here.
83+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
84+
logLevel = org.slf4j.event.Level.DEBUG
85+
}
86+
}
87+
88+
mods {
89+
// define mod <-> source bindings
90+
// these are used to tell the game which sources are for which mod
91+
// mostly optional in a single mod project
92+
// but multi mod projects should define one per mod
93+
"${mod_id}" {
94+
sourceSet(sourceSets.main)
95+
}
96+
}
97+
}
98+
99+
// Include resources generated by data generators.
100+
sourceSets.main.resources { srcDir 'src/generated/resources' }
101+
102+
103+
dependencies {
104+
implementation "org.appliedenergistics:appliedenergistics2:${ae2_version}"
105+
implementation "dev.emi:emi-neoforge:${emi_version}"
106+
}
107+
108+
// This block of code expands all declared replace properties in the specified resource targets.
109+
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
110+
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {
111+
var replaceProperties = [minecraft_version : minecraft_version,
112+
minecraft_version_range: minecraft_version_range,
113+
neo_version : neo_version,
114+
neo_version_range : neo_version_range,
115+
loader_version_range : loader_version_range,
116+
mod_id : mod_id,
117+
mod_name : mod_name,
118+
mod_license : mod_license,
119+
mod_version : mod_version,
120+
mod_authors : mod_authors,
121+
mod_description : mod_description,
122+
ae2_version : ae2_version,
123+
emi_version : emi_version,
124+
]
125+
inputs.properties replaceProperties
126+
expand replaceProperties
127+
from "src/main/templates"
128+
into "build/generated/sources/modMetadata"
129+
}
130+
131+
// Include the output of "generateModMetadata" as an input directory for the build
132+
// this works with both building through Gradle and the IDE.
133+
sourceSets.main.resources.srcDir generateModMetadata
134+
// To avoid having to run "generateModMetadata" manually, make it run on every project reload
135+
neoForge.ideSyncTask generateModMetadata
136+
137+
// Example configuration to allow publishing using the maven-publish plugin
138+
publishing {
139+
publications {
140+
register('mavenJava', MavenPublication) {
141+
from components.java
142+
}
143+
}
144+
repositories {
145+
maven {
146+
url "file://${project.projectDir}/repo"
147+
}
148+
}
149+
}
150+
151+
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
152+
idea {
153+
module {
154+
downloadSources = true
155+
downloadJavadoc = true
156+
}
157+
}

gradle.properties

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
org.gradle.jvmargs=-Xmx2G
3+
org.gradle.daemon=true
4+
org.gradle.parallel=true
5+
org.gradle.caching=true
6+
org.gradle.configuration-cache=true
7+
## Environment Properties
8+
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
9+
# The Minecraft version must agree with the Neo version to get a valid artifact
10+
minecraft_version=1.21.1
11+
# The Minecraft version range can use any release version of Minecraft as bounds.
12+
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
13+
# as they do not follow standard versioning conventions.
14+
minecraft_version_range=[1.21.1,1.22)
15+
# The Neo version must agree with the Minecraft version to get a valid artifact
16+
neo_version=21.1.219
17+
# The Neo version range can use any version of Neo as bounds
18+
neo_version_range=[21,)
19+
# The loader version range can only use the major version of FML as bounds
20+
loader_version_range=[4,)
21+
parchment_minecraft_version=1.21.11
22+
parchment_mappings_version=2025.12.20
23+
## Mod Properties
24+
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
25+
# Must match the String constant located in the main mod class annotated with @Mod.
26+
mod_id=emi_patternizer
27+
mod_name=EMI Patternizer
28+
mod_license=GNU LGPL 3.0
29+
mod_version=0.1.0
30+
mod_group_id=io.github.linkfgfgui
31+
mod_authors=link-fgfgui
32+
mod_description=
33+
ae2_version=19.2.17
34+
emi_version=1.1.22+1.21.1

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

0 commit comments

Comments
 (0)