Skip to content

Commit 9adb2c0

Browse files
committed
Port to 1.20.6
1 parent fb5a46d commit 9adb2c0

File tree

23 files changed

+92
-395
lines changed

23 files changed

+92
-395
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19-
- name: Set up JDK 17
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v4
2121
with:
22-
java-version: '17'
22+
java-version: '21'
2323
distribution: 'temurin'
2424
cache: gradle
2525
- name: Grant execute permission for gradlew

.github/workflows/release.yml

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

build.gradle

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
plugins {
22
id "architectury-plugin" version "3.4-SNAPSHOT"
3-
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
3+
id "dev.architectury.loom" version "1.11-SNAPSHOT" apply false
44
id "com.diffplug.spotless" version "6.25.0"
5+
id 'com.gradleup.shadow' version '8.3.6' apply false
56
}
67

78
architectury {
@@ -24,6 +25,23 @@ subprojects {
2425
parchment("org.parchmentmc.data:parchment-${rootProject.parchment_minecraft_version}:${rootProject.parchment_version}")
2526
}
2627
}
28+
29+
processResources {
30+
var replaceProperties = [
31+
minecraft_version : rootProject.minecraft_version,
32+
minecraft_version_range: rootProject.minecraft_version_range,
33+
neo_version_range : rootProject.neo_version_range,
34+
loader_version_range : rootProject.loader_version_range,
35+
mod_version : rootProject.mod_version,
36+
architectury_version : rootProject.architectury_version,
37+
]
38+
inputs.properties replaceProperties
39+
replaceProperties.put 'project', project
40+
41+
filesMatching(['META-INF/neoforge.mods.toml', 'fabric.mod.json']) {
42+
expand replaceProperties
43+
}
44+
}
2745
}
2846

2947
allprojects {
@@ -49,29 +67,11 @@ allprojects {
4967
}
5068
}
5169

52-
tasks.withType(ProcessResources).configureEach {
53-
var replaceProperties = [
54-
minecraft_version : rootProject.minecraft_version,
55-
minecraft_version_range: rootProject.minecraft_version_range,
56-
neo_version : rootProject.neo_version,
57-
neo_version_range : rootProject.neo_version_range,
58-
loader_version_range : rootProject.loader_version_range,
59-
mod_version : rootProject.mod_version,
60-
architectury_version : rootProject.architectury_version,
61-
architectury_next_api : Integer.toString(Integer.parseInt(rootProject.architectury_version.split("\\.")[0]) + 1)
62-
]
63-
inputs.properties replaceProperties
64-
65-
filesMatching(['META-INF/mods.toml', 'fabric.mod.json']) {
66-
expand replaceProperties + [project: project]
67-
}
68-
}
69-
70-
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
70+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
7171

7272
tasks.withType(JavaCompile) {
7373
options.encoding = "UTF-8"
74-
options.release = 17
74+
options.release = 21
7575
}
7676

7777
java {

common/src/main/java/de/ambossmann/anvilclient/AnvilclientCommon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.slf4j.LoggerFactory;
2525

2626
public class AnvilclientCommon {
27-
public static final String MOD_ID = "de/ambossmann/anvilclient";
27+
public static final String MOD_ID = "anvilclient";
2828
public static final String KEY_CATEGORY = "anvilclient.key.categories.anvilclient";
2929
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
3030

common/src/main/java/de/ambossmann/anvilclient/features/Features.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public class Features {
3232
public static final AutoTool AUTO_TOOL = new AutoTool();
3333
public static final Coordinates COORDINATES = new Coordinates();
3434
public static final Fullbright FULLBRIGHT = new Fullbright();
35-
// public static final BedwarsInfo BEDWARS_INFO = new BedwarsInfo();
3635
public static final FPSDisplay FPS_DISPLAY = new FPSDisplay();
3736
public static final CPSDisplay CPS_DISPLAY = new CPSDisplay();
3837
public static final ArmorDurability ARMOR_DURABILITY = new ArmorDurability();

common/src/main/java/de/ambossmann/anvilclient/features/building/AutoTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private int getSilkTouchEnchantmentLevel(ItemStack tool) {
122122
}
123123

124124
private int getFortuneEnchantmentLevel(ItemStack tool) {
125-
return EnchantmentHelper.getItemEnchantmentLevel(Enchantments.BLOCK_FORTUNE, tool);
125+
return EnchantmentHelper.getItemEnchantmentLevel(Enchantments.FORTUNE, tool);
126126
}
127127

128128
private Slot getBestTool(BlockPos blockPos) {

common/src/main/java/de/ambossmann/anvilclient/features/info/ArmorDurability.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ public enum DisplayDirection implements OptionEnum {
108108
private final String translationKey;
109109

110110
DisplayDirection() {
111-
this.translationKey =
112-
"anvilclient.feature.autoTool.armorDurability." + this.toString().toLowerCase();
111+
this.translationKey = "anvilclient.feature.armorDurability." + this.toString().toLowerCase();
113112
}
114113

115114
@Override

common/src/main/java/de/ambossmann/anvilclient/features/info/BedwarsInfo.java

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

common/src/main/java/de/ambossmann/anvilclient/gui/config/CategoryGui.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ protected void addOptions() {
3838

3939
for (Feature feature : featureList) {
4040
if (feature.getFeatureToggle() != null) {
41-
this.optionsList.addSmall(SettingUtils.getOptionListForFeature(feature, this));
41+
this.list.addSmall(SettingUtils.getOptionListForFeature(feature, this));
4242
} else {
43-
this.optionsList.addBig(
43+
this.list.addBig(
4444
SettingUtils.getClickOption(
4545
"anvilclient.feature." + feature.getName(),
4646
() -> Minecraft.getInstance().setScreen(new FeatureGui(feature, this))));

0 commit comments

Comments
 (0)