Skip to content

Commit 908b490

Browse files
update to j16 and mc17
1 parent 6fca6ce commit 908b490

20 files changed

Lines changed: 108 additions & 114 deletions

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,6 @@ run/
119119
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
120120
!gradle-wrapper.jar
121121

122-
remappedSrc/dimthread/
122+
remappedSrc/**
123+
src/test/**
124+
logs/**

build.gradle

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,78 @@
11
plugins {
2-
id 'fabric-loom' version '0.5-SNAPSHOT'
2+
id 'fabric-loom' version '0.8-SNAPSHOT'
33
id 'maven-publish'
44
}
55

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

99
archivesBaseName = project.archives_base_name
1010
version = project.mod_version
1111
group = project.maven_group
1212

1313
repositories {
14-
maven { url 'https://jitpack.io' }
15-
}
16-
17-
minecraft {
18-
accessWidener = file("src/main/resources/dimthread.accesswidener")
14+
maven {
15+
url "https://jitpack.io"
16+
}
17+
// Add repositories to retrieve artifacts from in here.
18+
// You should only use this when depending on other mods because
19+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
20+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
21+
// for more information about repositories.
1922
}
2023

2124
dependencies {
22-
implementation 'com.github.WearBlackAllDay:JavaUtils:ab1e0ad736be1d2c2d74c68fa8e9e40e752f2d18'
23-
include 'com.github.WearBlackAllDay:JavaUtils:ab1e0ad736be1d2c2d74c68fa8e9e40e752f2d18'
24-
//to change the versions see the gradle.properties file
25-
minecraft "com.mojang:minecraft:1.16.5"
26-
mappings "net.fabricmc:yarn:1.16.5+build.6:v2"
27-
modImplementation "net.fabricmc:fabric-loader:0.11.3"
25+
implementation "com.github.wearblackallday:JavaUtils:1b369d41cd"
26+
include"com.github.wearblackallday:JavaUtils:1b369d41cd"
27+
28+
// To change the versions see the gradle.properties file
29+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
30+
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
31+
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
2832

29-
//Fabric api
30-
//modImplementation "net.fabricmc.fabric-api:fabric-api:0.32.5+1.16"
31-
modCompile "net.fabricmc.fabric-api:fabric-game-rule-api-v1:${project.fabric_game_rule_v1_version}"
33+
// Fabric API. This is technically optional, but you probably want it anyway.
34+
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
35+
modImplementation"net.fabricmc.fabric-api:fabric-game-rule-api-v1:${project.fabric_game_rule_v1_version}"
3236

3337
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
3438
// You may need to force-disable transitiveness on them.
39+
}
3540

41+
minecraft {
42+
accessWidener = file("src/main/resources/dimthread.accesswidener")
43+
refmapName = "dimthread.refmap.json"
3644
}
3745

3846
processResources {
3947
inputs.property "version", project.version
4048

41-
from(sourceSets.main.resources.srcDirs) {
42-
include "fabric.mod.json"
49+
filesMatching("fabric.mod.json") {
4350
expand "version": project.version
4451
}
45-
46-
from(sourceSets.main.resources.srcDirs) {
47-
exclude "fabric.mod.json"
48-
}
4952
}
5053

51-
// ensure that the encoding is set to UTF-8, no matter what the system default is
52-
// this fixes some edge cases with special characters not displaying correctly
53-
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
54-
tasks.withType(JavaCompile) {
55-
options.encoding = "UTF-8"
54+
tasks.withType(JavaCompile).configureEach {
55+
// ensure that the encoding is set to UTF-8, no matter what the system default is
56+
// this fixes some edge cases with special characters not displaying correctly
57+
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
58+
// If Javadoc is generated, this must be specified in that task too.
59+
it.options.encoding = "UTF-8"
60+
61+
// Minecraft 1.17 (21w19a) upwards uses Java 16.
62+
it.options.release = 16
5663
}
5764

58-
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
59-
// if it is present.
60-
// If you remove this task, sources will not be generated.
61-
task sourcesJar(type: Jar, dependsOn: classes) {
62-
classifier = "sources"
63-
from sourceSets.main.allSource
65+
java {
66+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
67+
// if it is present.
68+
// If you remove this line, sources will not be generated.
69+
withSourcesJar()
6470
}
6571

6672
jar {
67-
from "LICENSE"
73+
from("LICENSE") {
74+
rename { "${it}_${project.archivesBaseName}"}
75+
}
6876
}
6977

7078
// configure the maven publication
@@ -81,9 +89,11 @@ publishing {
8189
}
8290
}
8391

84-
// select the repositories you want to publish to
92+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
8593
repositories {
86-
// uncomment to publish to the local maven
87-
// mavenLocal()
94+
// Add repositories to publish to here.
95+
// Notice: This block does NOT have the same function as the block in the top level.
96+
// The repositories here will be used for publishing your artifact, not for
97+
// retrieving dependencies.
8898
}
89-
}
99+
}

gradle.properties

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
org.gradle.jvmargs=-Xmx1G
33
# Fabric Properties
44
# check these on https://modmuss50.me/fabric.html
5-
minecraft_version=1.16.5
6-
yarn_mappings=1.16.5+build.6
5+
minecraft_version=1.17
6+
yarn_mappings=1.17+build.5
77
loader_version=0.11.3
88
# Mod Properties
9-
mod_version=1.2.3
10-
maven_group=DimThread
9+
mod_version=1.2.4
10+
maven_group=wearblackallday
1111
archives_base_name=DimThread
1212
# Dependencies
1313
# check this on https://modmuss50.me/fabric.html
14-
fabric_version=0.32.5+1.16
15-
fabric_game_rule_v1_version=1.0.2+f8ac1db295
14+
#fabric_version=0.34.9+1.17
15+
fabric_game_rule_v1_version=1.0.6+a02b4463d5
16+
Lines changed: 1 addition & 1 deletion
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-6.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/dimthread/util/CrashInfo.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/main/java/dimthread/DimThread.java renamed to src/main/java/wearblackallday/dimthread/DimThread.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
package dimthread;
1+
package wearblackallday.dimthread;
22

3-
import dimthread.init.ModGameRules;
4-
import dimthread.thread.IMutableMainThread;
5-
import dimthread.util.ServerManager;
63
import net.fabricmc.api.ModInitializer;
74
import net.minecraft.server.MinecraftServer;
85
import net.minecraft.server.world.ServerWorld;
9-
import threading.ThreadPool;
6+
import wearblackallday.dimthread.init.ModGameRules;
7+
import wearblackallday.dimthread.thread.IMutableMainThread;
8+
import wearblackallday.dimthread.util.ServerManager;
9+
import wearblackallday.util.ThreadPool;
1010

1111
public class DimThread implements ModInitializer {
1212

13-
public static final String MOD_ID = "dimthread";
13+
public static final String MOD_ID = "wearblackallday/dimthread";
1414
public static final ServerManager MANAGER = new ServerManager();
1515

1616
@Override

src/main/java/dimthread/gamerule/BoolRule.java renamed to src/main/java/wearblackallday/dimthread/gamerule/BoolRule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dimthread.gamerule;
1+
package wearblackallday.dimthread.gamerule;
22

33
import net.fabricmc.fabric.api.gamerule.v1.GameRuleFactory;
44
import net.minecraft.server.MinecraftServer;
@@ -42,5 +42,4 @@ public BoolRule build() {
4242
return new BoolRule(this.name, this.category, GameRuleFactory.createBooleanRule(this.initialValue, this.callback));
4343
}
4444
}
45-
4645
}

src/main/java/dimthread/gamerule/GameRule.java renamed to src/main/java/wearblackallday/dimthread/gamerule/GameRule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package dimthread.gamerule;
1+
package wearblackallday.dimthread.gamerule;
22

3-
import dimthread.DimThread;
3+
import wearblackallday.dimthread.DimThread;
44
import net.fabricmc.fabric.api.gamerule.v1.GameRuleRegistry;
55
import net.minecraft.world.GameRules;
66

src/main/java/dimthread/gamerule/IntRule.java renamed to src/main/java/wearblackallday/dimthread/gamerule/IntRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dimthread.gamerule;
1+
package wearblackallday.dimthread.gamerule;
22

33
import net.fabricmc.fabric.api.gamerule.v1.GameRuleFactory;
44
import net.minecraft.server.MinecraftServer;

src/main/java/dimthread/init/ModGameRules.java renamed to src/main/java/wearblackallday/dimthread/init/ModGameRules.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package dimthread.init;
1+
package wearblackallday.dimthread.init;
22

3-
import dimthread.DimThread;
4-
import dimthread.gamerule.BoolRule;
5-
import dimthread.gamerule.IntRule;
3+
import wearblackallday.dimthread.DimThread;
4+
import wearblackallday.dimthread.gamerule.BoolRule;
5+
import wearblackallday.dimthread.gamerule.IntRule;
66
import net.minecraft.world.GameRules;
77

88
public class ModGameRules {

0 commit comments

Comments
 (0)