Skip to content

Commit 151dfd3

Browse files
committed
Backport to Minecraft 1.20.1
1 parent 0efe28f commit 151dfd3

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
java-version: [ 21 ]
16+
java-version: [ 17 ]
1717

1818
steps:
1919
- name: Checkout repository

fabric/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
plugins {
2-
id 'fabric-loom' version '1.12-SNAPSHOT'
2+
id 'fabric-loom' version '1.10-SNAPSHOT'
33
id 'com.gradleup.shadow' version '9.2.2'
44
}
55

66
java {
7-
sourceCompatibility = JavaVersion.VERSION_21
8-
targetCompatibility = JavaVersion.VERSION_21
7+
sourceCompatibility = JavaVersion.VERSION_17
8+
targetCompatibility = JavaVersion.VERSION_17
99
}
1010

1111
ext {
12-
minecraft_version = '1.21.1'
13-
yarn_mappings = '1.21.1+build.3'
12+
minecraft_version = '1.20.1'
13+
yarn_mappings = '1.20.1+build.10'
1414
loader_version = '0.18.5'
15-
fabric_version = '0.116.9+1.21.1'
15+
fabric_version = '0.92.7+1.20.1'
1616
}
1717

1818
dependencies {

fabric/src/main/java/com/azuriom/azlink/fabric/MinecraftTextAdapter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.azuriom.azlink.common.chat.TextColor;
44
import com.azuriom.azlink.common.chat.TextComponent;
55
import com.azuriom.azlink.common.chat.TextDecoration;
6-
import net.minecraft.component.Component;
76
import net.minecraft.text.ClickEvent;
87
import net.minecraft.text.MutableText;
98
import net.minecraft.text.Style;
@@ -14,7 +13,7 @@
1413
import java.util.Map;
1514

1615
/**
17-
* Adapter to convert {@link TextComponent} to Minecraft {@link Component}.
16+
* Adapter to convert {@link TextComponent} to Minecraft {@link Text}.
1817
*/
1918
public final class MinecraftTextAdapter {
2019

fabric/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
},
2121
"mixins": [],
2222
"depends": {
23-
"fabricloader": ">=0.14.11",
24-
"fabric-api": "*",
25-
"minecraft": "~1.21"
23+
"fabricloader": ">=0.9.0",
24+
"fabric-api-base": "*"
2625
}
2726
}

forge/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
plugins {
2-
id 'net.minecraftforge.gradle' version '[6.0.24,6.2)'
2+
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
33
id 'com.gradleup.shadow' version '9.2.2'
44
}
55

66
java {
7-
sourceCompatibility = JavaVersion.VERSION_21
8-
targetCompatibility = JavaVersion.VERSION_21
7+
sourceCompatibility = JavaVersion.VERSION_17
8+
targetCompatibility = JavaVersion.VERSION_17
99
}
1010

1111
ext {
12-
minecraft_version = '1.21.1'
13-
forge_version = '52.1.0'
12+
minecraft_version = '1.20.1'
13+
forge_version = '47.4.10'
1414
}
1515

1616
dependencies {

forge/src/main/java/com/azuriom/azlink/forge/AzLinkForgeMod.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ public void onRegisterCommands(RegisterCommandsEvent event) {
9292
}
9393

9494
@SubscribeEvent
95-
public void onTickStart(TickEvent.ServerTickEvent.Pre event) {
96-
this.tpsTask.run();
95+
public void onTickStart(TickEvent.ServerTickEvent event) {
96+
if (event.phase == TickEvent.Phase.START) {
97+
this.tpsTask.run();
98+
}
9799
}
98100

99101
@Override

forge/src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
modLoader = "javafml"
2-
loaderVersion = "[52,)"
2+
loaderVersion = "[47,)"
33
license = "MIT"
44
issueTrackerURL="https://github.com/Azuriom/AzLink/issues"
55

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def modules = [
2828
//'universal-legacy',
2929
'fabric',
3030
'forge',
31-
'neoforge',
31+
//'neoforge',
3232
]
3333

3434
modules.each {

0 commit comments

Comments
 (0)