Skip to content

Commit da74926

Browse files
committed
use the meteor built-in updater
(click on the name in title screen credits)
1 parent b8ddf8c commit da74926

File tree

6 files changed

+27
-62
lines changed

6 files changed

+27
-62
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ processResources {
3535
expand "version": project.version
3636

3737
filter { line -> line.replace("@mc_version@", project.minecraft_version) }
38-
filter { line -> line.replace("@gh_hash@", System.getenv("GITHUB_SHA") ?: "unknown") }
38+
filter { line -> line.replace("@gh_hash@", System.getenv("GITHUB_SHA") ?: "") }
3939
}
4040
}
4141

src/main/java/anticope/tanuki/Tanuki.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package anticope.tanuki;
22

33
import meteordevelopment.meteorclient.MeteorClient;
4+
import meteordevelopment.meteorclient.addons.GithubRepo;
45
import meteordevelopment.meteorclient.addons.MeteorAddon;
56
import meteordevelopment.meteorclient.systems.Systems;
67
import meteordevelopment.meteorclient.systems.hud.HUD;
@@ -9,6 +10,8 @@
910
import java.lang.invoke.MethodHandles;
1011
import anticope.tanuki.modules.*;
1112
import anticope.tanuki.modules.hud.*;
13+
14+
import net.fabricmc.loader.api.FabricLoader;
1215
import net.minecraft.item.Items;
1316
import org.slf4j.Logger;
1417
import org.slf4j.LoggerFactory;
@@ -43,4 +46,25 @@ public void onInitialize() {
4346
public void onRegisterCategories() {
4447
Modules.registerCategory(CATEGORY);
4548
}
49+
50+
@Override
51+
public String getWebsite() {
52+
return "https://github.com/AntiCope/tanuki";
53+
}
54+
55+
@Override
56+
public GithubRepo getRepo() {
57+
return new GithubRepo("AntiCope", "tanuki");
58+
}
59+
60+
@Override
61+
public String getCommit() {
62+
String commit = FabricLoader
63+
.getInstance()
64+
.getModContainer("tanuki")
65+
.get().getMetadata()
66+
.getCustomValue("github:sha")
67+
.getAsString();
68+
return commit.isEmpty() ? null : commit.trim();
69+
}
4670
}

src/main/java/anticope/tanuki/mixin/TitleScreenMixin.java

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

src/main/java/anticope/tanuki/utils/UpdateUtil.java

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

src/main/resources/fabric.mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Cloudburst"
1010
],
1111
"contact": {
12-
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
12+
"repo": "https://github.com/AntiCope/tanuki"
1313
},
1414
"icon": "assets/tanuki/icon.png",
1515
"environment": "client",
@@ -23,7 +23,7 @@
2323
],
2424
"custom": {
2525
"meteor-client:color": "230,128,139",
26-
"updater:sha": "@gh_hash@"
26+
"github:sha": "@gh_hash@"
2727
},
2828
"depends": {
2929
"java": ">=17",

src/main/resources/tanuki.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"client": [
66
"ClientPlayerEntityMixin",
77
"TotemParticleMixin",
8-
"TitleScreenMixin",
98
"meteor.CrystalAuraAccessor",
109
"meteor.ProfileMixin"
1110
],

0 commit comments

Comments
 (0)