Skip to content

Commit 368b494

Browse files
committed
Initial commit
0 parents  commit 368b494

File tree

19 files changed

+862
-0
lines changed

19 files changed

+862
-0
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Automatically build the project and run any configured tests for every push
2+
# and submitted pull request. This can help catch issues that only occur on
3+
# certain platforms or Java versions, and provides a first line of defence
4+
# against bad commits.
5+
6+
name: build
7+
on: [pull_request, push]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
# Use these Java versions
14+
java: [
15+
17, # Current Java LTS & minimum supported by Minecraft
16+
]
17+
# and run on both Linux and Windows
18+
os: [ubuntu-20.04, windows-2022]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: checkout repository
22+
uses: actions/checkout@v2
23+
- name: validate gradle wrapper
24+
uses: gradle/wrapper-validation-action@v1
25+
- name: setup jdk ${{ matrix.java }}
26+
uses: actions/setup-java@v1
27+
with:
28+
java-version: ${{ matrix.java }}
29+
- name: make gradle wrapper executable
30+
if: ${{ runner.os != 'Windows' }}
31+
run: chmod +x ./gradlew
32+
- name: build
33+
run: ./gradlew build
34+
- name: capture build artifacts
35+
if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: Artifacts
39+
path: build/libs/

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# gradle
2+
3+
.gradle/
4+
build/
5+
out/
6+
classes/
7+
8+
# eclipse
9+
10+
*.launch
11+
12+
# idea
13+
14+
.idea/
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# vscode
20+
21+
.settings/
22+
.vscode/
23+
bin/
24+
.classpath
25+
.project
26+
27+
# macos
28+
29+
*.DS_Store
30+
31+
# fabric
32+
33+
run/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 ΡΞΛΚSΤΞΡ
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EMI Trades
2+
3+
An addon for EMI adding Villager Trade support.
4+
5+
### Features
6+
7+
* Showing the costs and payments
8+
* Showing the level required for a trade
9+
10+
### Planned
11+
12+
* Adding wandering trader trade support

build.gradle

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
plugins {
2+
id 'fabric-loom' version '1.0-SNAPSHOT'
3+
id 'maven-publish'
4+
}
5+
6+
sourceCompatibility = JavaVersion.VERSION_17
7+
targetCompatibility = JavaVersion.VERSION_17
8+
9+
archivesBaseName = project.archives_base_name
10+
version = project.mod_version + "+mc" + project.minecraft_version
11+
group = project.maven_group
12+
13+
loom {
14+
accessWidenerPath = file("src/main/resources/emitrades.accesswidener")
15+
}
16+
17+
repositories {
18+
maven {
19+
name = "TerraformersMC"
20+
url = "https://maven.terraformersmc.com/"
21+
}
22+
}
23+
24+
dependencies {
25+
// To change the versions see the gradle.properties file
26+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
27+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
28+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
29+
30+
// Fabric API. This is technically optional, but you probably want it anyway.
31+
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
32+
33+
modImplementation "dev.emi:emi:${project.emi_version}"
34+
35+
// Uncomment the following line to enable the deprecated Fabric API modules.
36+
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
37+
38+
// modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
39+
}
40+
41+
processResources {
42+
inputs.property "version", project.version
43+
44+
filesMatching("fabric.mod.json") {
45+
expand "version": project.version
46+
}
47+
}
48+
49+
tasks.withType(JavaCompile).configureEach {
50+
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
51+
it.options.release = 17
52+
}
53+
54+
java {
55+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
56+
// if it is present.
57+
// If you remove this line, sources will not be generated.
58+
withSourcesJar()
59+
}
60+
61+
jar {
62+
from("LICENSE") {
63+
rename { "${it}_${project.archivesBaseName}"}
64+
}
65+
}
66+
67+
// configure the maven publication
68+
publishing {
69+
publications {
70+
mavenJava(MavenPublication) {
71+
from components.java
72+
}
73+
}
74+
75+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
76+
repositories {
77+
// Add repositories to publish to here.
78+
// Notice: This block does NOT have the same function as the block in the top level.
79+
// The repositories here will be used for publishing your artifact, not for
80+
// retrieving dependencies.
81+
}
82+
}

gradle.properties

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx2G
3+
4+
# Fabric Properties
5+
# check these on https://fabricmc.net/develop
6+
minecraft_version=1.19.2
7+
yarn_mappings=1.19.2+build.8
8+
loader_version=0.14.9
9+
10+
# Mod Properties
11+
mod_version = 1.0.0
12+
maven_group = io.github.pkstdev
13+
archives_base_name = EMITrades-fabric
14+
15+
# Dependencies
16+
fabric_version=0.60.0+1.19.2
17+
emi_version=0.3.4+1.19

gradle/wrapper/gradle-wrapper.jar

58.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+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)