Skip to content

Commit

Permalink
Removed UpdateNotifier in favor of Meteor's built-in update checker.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTas committed Apr 12, 2024
1 parent 99440ee commit b913836
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 128 deletions.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ dependencies {
}

processResources {
def propertyMap = [
"version": project.version,
"mc_version": project.minecraft_version,
"commit": project.findProperty("commit") ?: ""
]

inputs.properties(propertyMap)
filesMatching("fabric.mod.json") {
expand "version": project.version, "mc_version": project.minecraft_version
expand(propertyMap)
}
}

Expand Down
16 changes: 14 additions & 2 deletions src/main/java/dev/stardust/Stardust.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import dev.stardust.commands.*;
import com.mojang.logging.LogUtils;
import dev.stardust.util.StardustUtil;
import net.fabricmc.loader.api.FabricLoader;
import meteordevelopment.meteorclient.MeteorClient;
import net.fabricmc.loader.api.metadata.CustomValue;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.addons.GithubRepo;
import meteordevelopment.meteorclient.commands.Commands;
Expand Down Expand Up @@ -47,7 +50,6 @@ public void onInitialize() {
Modules.get().add(new StashBrander());
Modules.get().add(new SignatureSign());
Modules.get().add(new SignHistorian());
Modules.get().add(new UpdateNotifier());
Modules.get().add(new AutoDyeShulkers());
Modules.get().add(new AutoDrawDistance());

Expand Down Expand Up @@ -90,5 +92,15 @@ public void onRegisterCategories() {
@Override
public String getWebsite() { return "https://github.com/0xTas/stardust"; }
@Override
public GithubRepo getRepo() { return new GithubRepo("0xTas", "Stardust"); }
public GithubRepo getRepo() { return new GithubRepo("0xTas", "Stardust", "1.20.4"); }
@Override
public String getCommit() {
CustomValue commit = FabricLoader.getInstance()
.getModContainer("stardust")
.orElseThrow()
.getMetadata()
.getCustomValue(MeteorClient.MOD_ID + ":commit");

return commit == null ? null : commit.getAsString();
}
}
124 changes: 0 additions & 124 deletions src/main/java/dev/stardust/modules/UpdateNotifier.java

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"stardust.mixins.json"
],
"custom": {
"meteor-client:color": "147,233,190"
"meteor-client:color": "147,233,190",
"meteor-client:commit": "27691f9711223086cb2783b2b004c48f4c96214d"
},
"depends": {
"java": ">=17",
Expand Down

0 comments on commit b913836

Please sign in to comment.