Skip to content

Commit d8cb43c

Browse files
committed
Initial commit
0 parents  commit d8cb43c

File tree

20 files changed

+1042
-0
lines changed

20 files changed

+1042
-0
lines changed

.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

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
24+
# Files from Forge MDK
25+
forge*changelog.txt

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# MC2DiscordNotify
2+
Simple minecraft mod for 1.16.5 which rings a bell (literally) when someone mentiones you in chat.
3+
You also have the ability to specify a discord webhook url inside the config, so that you will receive
4+
messages inside a discord channel whenever mentioned.
5+
6+
## Getting Started
7+
1. Clone this project.
8+
2. Run `setup.bat`
9+
3. Open the project with IntelliJ (or another ide, but make sure to update the setup.bat accordingly)
10+
4. Run the project
11+
5. [Optional] Open `.minecraft\config\mc2discord-notify-client.toml` and fill in the discord credentials.
12+
6. [Optional] If you updated the config, restart minecraft.
13+
7. Enjoy! :tada:
14+
15+
## Releases / Downloads
16+
The latest releases can be found [here](https://github.com/tikinetwork/MCToDiscordNotify/releases).
17+
18+
## Authors
19+
- [Tjeu Foolen](https://github.com/tjeufoolen)
20+
- [Micha Nijenhof](https://github.com/nijenhof)

build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gradlew build

build.gradle

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
buildscript {
2+
repositories {
3+
maven { url = 'https://files.minecraftforge.net/maven' }
4+
jcenter()
5+
mavenCentral()
6+
}
7+
dependencies {
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
9+
}
10+
}
11+
apply plugin: 'net.minecraftforge.gradle'
12+
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
13+
apply plugin: 'eclipse'
14+
apply plugin: 'maven-publish'
15+
16+
version = '1.0'
17+
group = 'network.tiki.MCToDiscordNotify' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
18+
archivesBaseName = 'MCToDiscordNotify'
19+
20+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
21+
22+
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
23+
minecraft {
24+
// The mappings can be changed at any time, and must be in the following format.
25+
// snapshot_YYYYMMDD Snapshot are built nightly.
26+
// stable_# Stables are built at the discretion of the MCP team.
27+
// Use non-default mappings at your own risk. they may not always work.
28+
// Simply re-run your setup task after changing the mappings to update your workspace.
29+
mappings channel: 'snapshot', version: '20201028-1.16.3'
30+
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
31+
32+
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
33+
34+
// Default run configurations.
35+
// These can be tweaked, removed, or duplicated as needed.
36+
runs {
37+
client {
38+
workingDirectory project.file('run')
39+
40+
// Recommended logging data for a userdev environment
41+
// The markers can be changed as needed.
42+
// "SCAN": For mods scan.
43+
// "REGISTRIES": For firing of registry events.
44+
// "REGISTRYDUMP": For getting the contents of all registries.
45+
property 'forge.logging.markers', 'REGISTRIES'
46+
47+
// Recommended logging level for the console
48+
// You can set various levels here.
49+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
50+
property 'forge.logging.console.level', 'debug'
51+
52+
mods {
53+
examplemod {
54+
source sourceSets.main
55+
}
56+
}
57+
}
58+
59+
server {
60+
workingDirectory project.file('run')
61+
62+
// Recommended logging data for a userdev environment
63+
// The markers can be changed as needed.
64+
// "SCAN": For mods scan.
65+
// "REGISTRIES": For firing of registry events.
66+
// "REGISTRYDUMP": For getting the contents of all registries.
67+
property 'forge.logging.markers', 'REGISTRIES'
68+
69+
// Recommended logging level for the console
70+
// You can set various levels here.
71+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
72+
property 'forge.logging.console.level', 'debug'
73+
74+
mods {
75+
examplemod {
76+
source sourceSets.main
77+
}
78+
}
79+
}
80+
81+
data {
82+
workingDirectory project.file('run')
83+
84+
// Recommended logging data for a userdev environment
85+
// The markers can be changed as needed.
86+
// "SCAN": For mods scan.
87+
// "REGISTRIES": For firing of registry events.
88+
// "REGISTRYDUMP": For getting the contents of all registries.
89+
property 'forge.logging.markers', 'REGISTRIES'
90+
91+
// Recommended logging level for the console
92+
// You can set various levels here.
93+
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
94+
property 'forge.logging.console.level', 'debug'
95+
96+
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
97+
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
98+
99+
mods {
100+
examplemod {
101+
source sourceSets.main
102+
}
103+
}
104+
}
105+
}
106+
}
107+
108+
// Include resources generated by data generators.
109+
sourceSets.main.resources { srcDir 'src/generated/resources' }
110+
111+
dependencies {
112+
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
113+
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
114+
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
115+
minecraft 'net.minecraftforge:forge:1.16.5-36.0.46'
116+
117+
// You may put jars on which you depend on in ./libs or you may define them like so..
118+
// compile "some.group:artifact:version:classifier"
119+
// compile "some.group:artifact:version"
120+
121+
// Real examples
122+
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
123+
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
124+
125+
// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
126+
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
127+
128+
// These dependencies get remapped to your current MCP mappings
129+
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
130+
131+
// For more info...
132+
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
133+
// http://www.gradle.org/docs/current/userguide/dependency_management.html
134+
135+
}
136+
137+
// Example for how to get properties into the manifest for reading by the runtime..
138+
jar {
139+
manifest {
140+
attributes([
141+
"Specification-Title": "MCToDiscordNotify",
142+
"Specification-Vendor": "tikinetwork",
143+
"Specification-Version": "1", // We are version 1 of ourselves
144+
"Implementation-Title": project.name,
145+
"Implementation-Version": "${version}",
146+
"Implementation-Vendor" :"tikinetwork",
147+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
148+
])
149+
}
150+
}
151+
152+
// Example configuration to allow publishing using the maven-publish task
153+
// This is the preferred method to reobfuscate your jar file
154+
jar.finalizedBy('reobfJar')
155+
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
156+
//publish.dependsOn('reobfJar')
157+
158+
publishing {
159+
publications {
160+
mavenJava(MavenPublication) {
161+
artifact jar
162+
}
163+
}
164+
repositories {
165+
maven {
166+
url "file:///${project.projectDir}/mcmodsrepo"
167+
}
168+
}
169+
}

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2+
# This is required to provide enough memory for the Minecraft decompilation process.
3+
org.gradle.jvmargs=-Xmx3G
4+
org.gradle.daemon=false

gradle/wrapper/gradle-wrapper.jar

53.4 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
zipStoreBase=GRADLE_USER_HOME
4+
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip

0 commit comments

Comments
 (0)