Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit a77b4e5

Browse files
committed
Initial commit
0 parents  commit a77b4e5

15 files changed

+692
-0
lines changed

.github/workflows/gradle.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Gradle build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
branches:
10+
- master
11+
- main
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 1.8
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 1.8
24+
- name: Grant execute permission for gradlew
25+
run: chmod +x gradlew
26+
- name: Build with Gradle
27+
run: ./gradlew downloadAPI build
28+
- name: Upload jar
29+
uses: actions/upload-artifact@v1
30+
with:
31+
name: Artifacts
32+
path: build/libs/

.gitignore

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Java template
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.war
15+
*.nar
16+
*.ear
17+
*.zip
18+
*.tar.gz
19+
*.rar
20+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
21+
hs_err_pid*
22+
23+
### JetBrains template
24+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
25+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
26+
27+
# User-specific stuff
28+
.idea/**/workspace.xml
29+
.idea/**/tasks.xml
30+
.idea/**/usage.statistics.xml
31+
.idea/**/dictionaries
32+
.idea/**/shelf
33+
.idea/**/misc.xml
34+
.idea/**/discord.xml
35+
.idea/**/encodings.xml
36+
.idea/codeStyles/
37+
.idea/sonarlint/
38+
39+
# Generated files
40+
.idea/**/contentModel.xml
41+
.idea/**/jarRepositories.xml
42+
.idea/**/uiDesigner.xml
43+
.idea/**/inspectionProfiles
44+
.idea/**/.name
45+
.idea/**/vcs.xml
46+
.idea/**/compiler.xml
47+
run/**
48+
49+
# Sensitive or high-churn files
50+
.idea/**/dataSources/
51+
.idea/**/dataSources.ids
52+
.idea/**/dataSources.local.xml
53+
.idea/**/sqlDataSources.xml
54+
.idea/**/dynamic.xml
55+
.idea/**/dbnavigator.xml
56+
.idea/kotlinScripting.xml
57+
58+
# Gradle
59+
.idea/**/gradle.xml
60+
.idea/**/libraries
61+
62+
# Gradle and Maven with auto-import
63+
# When using Gradle or Maven with auto-import, you should exclude module files,
64+
# since they will be recreated, and may cause churn. Uncomment if using
65+
# auto-import.
66+
# .idea/artifacts
67+
# .idea/compiler.xml
68+
.idea/modules.xml
69+
.idea/*.iml
70+
# .idea/modules
71+
# *.iml
72+
# *.ipr
73+
74+
# CMake
75+
cmake-build-*/
76+
77+
# Mongo Explorer plugin
78+
.idea/**/mongoSettings.xml
79+
80+
# File-based project format
81+
*.iws
82+
83+
# IntelliJ
84+
out/
85+
86+
# mpeltonen/sbt-idea plugin
87+
.idea_modules/
88+
89+
# JIRA plugin
90+
atlassian-ide-plugin.xml
91+
92+
# Cursive Clojure plugin
93+
.idea/replstate.xml
94+
95+
# Crashlytics plugin (for Android Studio and IntelliJ)
96+
com_crashlytics_export_strings.xml
97+
crashlytics.properties
98+
crashlytics-build.properties
99+
fabric.properties
100+
101+
# Editor-based Rest Client
102+
.idea/httpRequests
103+
104+
# Android studio 3.1+ serialized cache file
105+
.idea/caches/build_file_checksums.ser
106+
107+
### Gradle template
108+
.gradle
109+
/**/build/
110+
111+
# Ignore Gradle GUI config
112+
gradle-app.setting
113+
114+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
115+
!gradle-wrapper.jar
116+
117+
# Cache of project
118+
.gradletasknamecache
119+
120+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
121+
# gradle/wrapper/gradle-wrapper.properties
122+
123+
.idea/modules/
124+
src/test/
125+
**/src/main/generated/*
126+
127+
.idea/intellij-javadocs-4.0.1.xml
128+
run/
129+
libs/

.idea/.gitignore

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
buildscript {
2+
repositories {
3+
maven { url = 'https://files.minecraftforge.net/maven' }
4+
maven { url = 'https://repo.spongepowered.org/maven' }
5+
maven {
6+
name = 'impactdevelopment-repo'
7+
url = 'https://impactdevelopment.github.io/maven/'
8+
}
9+
jcenter()
10+
mavenCentral()
11+
}
12+
dependencies {
13+
classpath group: 'com.github.ImpactDevelopment', name: 'ForgeGradle', version: '3.0.115'
14+
classpath group: 'com.github.ImpactDevelopment', name: 'MixinGradle', version: '0.6.2'
15+
}
16+
}
17+
18+
plugins {
19+
id 'de.undercouch.download' version '4.0.0'
20+
}
21+
apply plugin: 'net.minecraftforge.gradle'
22+
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
23+
apply plugin: 'eclipse'
24+
apply plugin: 'maven-publish'
25+
apply plugin: 'org.spongepowered.mixin'
26+
27+
version = '1.0.0'
28+
group = 'com.example' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
29+
archivesBaseName = 'Example Addon'
30+
31+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
32+
33+
def mcpVersion = [channel: 'snapshot', version: '20201028-1.16.3']
34+
35+
mixin {
36+
defaultObfuscationEnv searge
37+
add sourceSets.main, "example.refmap.json"
38+
}
39+
40+
minecraft {
41+
mappings mcpVersion
42+
43+
if (getProject().hasProperty("forge")) {
44+
reobfMappings 'searge'
45+
} else {
46+
reobfMappings 'notch'
47+
}
48+
49+
runs {
50+
client {
51+
workingDirectory project.file('run')
52+
53+
main "launch.AddonLauncher"
54+
55+
environment 'assetIndex', '{asset_index}'
56+
environment 'assetDirectory', downloadAssets.output
57+
environment 'nativesDirectory', extractNatives.output
58+
59+
environment 'tweakClass', 'net.labymod.vanilla.LabyModTweaker'
60+
61+
jvmArg('-DdebugMode=true')
62+
jvmArg('-Daddonresources=addon.json')
63+
}
64+
}
65+
}
66+
67+
repositories {
68+
mavenCentral()
69+
maven {
70+
name = "spongepowered"
71+
url = "https://repo.spongepowered.org/maven"
72+
}
73+
maven {
74+
name = 'impactdevelopment-repo'
75+
url = 'https://impactdevelopment.github.io/maven/'
76+
}
77+
mavenLocal()
78+
}
79+
80+
81+
dependencies {
82+
annotationProcessor("org.spongepowered:mixin:0.8.2:processor")
83+
84+
minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.5'
85+
compile(files('libs/lm_api_mc1.16.5.jar'))
86+
87+
compile("org.ow2.asm:asm-analysis:6.2") { transitive = false }
88+
compile("org.ow2.asm:asm-util:6.2") { transitive = false }
89+
compile("org.ow2.asm:asm-commons:6.2") { transitive = false }
90+
compile("org.spongepowered:mixin:0.8.2") { transitive = false }
91+
compile("net.minecraft:launchwrapper:1.12") { transitive = false }
92+
}
93+
94+
jar {
95+
// Excludes the start file
96+
exclude("**/launch")
97+
}
98+
99+
task downloadAPI(type: Download) {
100+
group("labymod")
101+
102+
File libraryDirectory = new File("libs/")
103+
104+
if (!libraryDirectory.exists()) {
105+
libraryDirectory.mkdirs()
106+
}
107+
108+
src "https://dl.labymod.net/latest/api/files/lm_api_mc1.16.5.jar"
109+
dest 'libs/'
110+
}
111+

gradle/wrapper/gradle-wrapper.jar

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

0 commit comments

Comments
 (0)