Skip to content

Commit e8f285e

Browse files
Redo name command
1 parent 24f0f5f commit e8f285e

22 files changed

+1029
-503
lines changed

.github/workflows/build.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
os: [ubuntu-20.04]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: checkout repository
21+
uses: actions/checkout@v2
22+
- name: validate gradle wrapper
23+
uses: gradle/wrapper-validation-action@v1
24+
- name: setup jdk ${{ matrix.java }}
25+
uses: actions/setup-java@v1
26+
with:
27+
java-version: ${{ matrix.java }}
28+
- name: make gradle wrapper executable
29+
run: chmod +x ./gradlew
30+
- name: build
31+
run: ./gradlew build
32+
- name: capture build artifacts
33+
if: ${{ matrix.java == '17' }} # Only upload artifacts built from latest java
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: Artifacts
37+
path: build/libs/

LICENSE

+674
Large diffs are not rendered by default.

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Name Command
2-
A mod for Minecraft that adds a name command.
1+
# Fabric Example Mod
32

4-
## Syntax:
3+
## Setup
54

6-
```
7-
/name target name
8-
```
5+
For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using.
6+
7+
## License
8+
9+
This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

build.gradle

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
2-
id 'fabric-loom' version '0.9-SNAPSHOT'
2+
id 'fabric-loom' version '0.12-SNAPSHOT'
33
id 'maven-publish'
44
}
55

6-
sourceCompatibility = JavaVersion.VERSION_16
7-
targetCompatibility = JavaVersion.VERSION_16
6+
sourceCompatibility = JavaVersion.VERSION_17
7+
targetCompatibility = JavaVersion.VERSION_17
88

99
archivesBaseName = project.archives_base_name
1010
version = project.mod_version
@@ -24,11 +24,8 @@ dependencies {
2424
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
2525
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
2626

27-
// Fabric API. This is technically optional, but you probably want it anyway.
27+
// Fabric API
2828
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
29-
30-
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
31-
// You may need to force-disable transitiveness on them.
3229
}
3330

3431
processResources {
@@ -40,14 +37,8 @@ processResources {
4037
}
4138

4239
tasks.withType(JavaCompile).configureEach {
43-
// ensure that the encoding is set to UTF-8, no matter what the system default is
44-
// this fixes some edge cases with special characters not displaying correctly
45-
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
46-
// If Javadoc is generated, this must be specified in that task too.
47-
it.options.encoding = "UTF-8"
48-
49-
// Minecraft 1.17 (21w19a) upwards uses Java 16.
50-
it.options.release = 16
40+
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
41+
it.options.release = 17
5142
}
5243

5344
java {
@@ -67,13 +58,7 @@ jar {
6758
publishing {
6859
publications {
6960
mavenJava(MavenPublication) {
70-
// add all the jars that should be included when publishing to maven
71-
artifact(remapJar) {
72-
builtBy remapJar
73-
}
74-
artifact(sourcesJar) {
75-
builtBy remapSourcesJar
76-
}
61+
from components.java
7762
}
7863
}
7964

gradle.properties

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
org.gradle.jvmargs=-Xmx2G
33

44
# Fabric Properties
5-
minecraft_version=1.17.1
6-
yarn_mappings=1.17.1+build.61
7-
loader_version=0.11.7
8-
9-
#Fabric api
10-
fabric_version=0.40.1+1.17
5+
minecraft_version=1.19
6+
yarn_mappings=1.19+build.4
7+
loader_version=0.14.8
118

129
# Mod Properties
13-
mod_version = 0.1
14-
maven_group = com.ryangar46.commandsplus
15-
archives_base_name = commands-plus
10+
mod_version = 0.1.0
11+
maven_group = com.ryangar46
12+
archives_base_name = commandsplus
13+
14+
# Dependencies
15+
fabric_version=0.56.3+1.19

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)