Skip to content

Commit

Permalink
Removed Config & Title Screen Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
XDPXI committed Nov 27, 2024
1 parent 6096569 commit 90074c8
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 286 deletions.
5 changes: 0 additions & 5 deletions src/client/java/dev/xdpxi/xdlib/XDsLibraryClient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package dev.xdpxi.xdlib;

import dev.xdpxi.xdlib.config.configManager;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
Expand Down Expand Up @@ -28,7 +27,6 @@ public class XDsLibraryClient implements ClientModInitializer {
public static int duration = -1;
public static List<HostileEntity> list = new ArrayList<>();
public static Map<String, Float> WorldCloudHeights = new HashMap<>();
public configManager CONFIG_MANAGER;

public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("windows");
Expand Down Expand Up @@ -86,9 +84,6 @@ public boolean isNoEarlyLoaders() {

@Override
public void onInitializeClient() {
configManager.registerConfig();
CONFIG_MANAGER = new configManager();

ClientTickEvents.END_CLIENT_TICK.register(client -> {
if (client.player != null) {
StatusEffectInstance darknessEffect = client.player.getStatusEffect(StatusEffects.DARKNESS);
Expand Down

This file was deleted.

87 changes: 0 additions & 87 deletions src/client/java/dev/xdpxi/xdlib/config/configManager.java

This file was deleted.

21 changes: 0 additions & 21 deletions src/client/java/dev/xdpxi/xdlib/config/modMenuIntegration.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.terraformersmc.modmenu.util.mod.Mod;
import com.terraformersmc.modmenu.util.mod.ModBadgeRenderer;
import dev.xdpxi.xdlib.api.mod.loader;
import dev.xdpxi.xdlib.config.configManager;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.text.OrderedText;
Expand Down Expand Up @@ -33,30 +32,28 @@ public abstract class ModBadgeRendererMixin {

@Inject(method = "draw", at = @At("TAIL"))
public void drawCustomBadges(DrawContext DrawContext, int mouseX, int mouseY, CallbackInfo ci) {
if (configManager.configData.isCustomBadges()) {
try {
FabricLoader.getInstance().getModContainer(mod.getId()).orElse(null)
.getMetadata().getCustomValue("mcb").getAsArray().forEach(customValue -> {
var obj = customValue.getAsObject();
var name = obj.get("name").getAsString();
var outline = obj.get("outlineColor").getAsNumber().intValue();
var fill = obj.get("fillColor").getAsNumber().intValue();
drawBadge(DrawContext, Text.literal(name).asOrderedText(), outline, fill, mouseX, mouseY);
});
} catch (Exception ignored) {
}
try {
FabricLoader.getInstance().getModContainer(mod.getId()).orElse(null)
.getMetadata().getCustomValue("xdlib").getAsObject()
.get("badges").getAsArray().forEach(customValue -> {
var obj = customValue.getAsObject();
var name = obj.get("name").getAsString();
var outline = obj.get("outlineColor").getAsNumber().intValue();
var fill = obj.get("fillColor").getAsNumber().intValue();
drawBadge(DrawContext, Text.literal(name).asOrderedText(), outline, fill, mouseX, mouseY);
});
} catch (Exception ignored) {
}
try {
FabricLoader.getInstance().getModContainer(mod.getId()).orElse(null)
.getMetadata().getCustomValue("mcb").getAsArray().forEach(customValue -> {
var obj = customValue.getAsObject();
var name = obj.get("name").getAsString();
var outline = obj.get("outlineColor").getAsNumber().intValue();
var fill = obj.get("fillColor").getAsNumber().intValue();
drawBadge(DrawContext, Text.literal(name).asOrderedText(), outline, fill, mouseX, mouseY);
});
} catch (Exception ignored) {
}
try {
FabricLoader.getInstance().getModContainer(mod.getId()).orElse(null)
.getMetadata().getCustomValue("xdlib").getAsObject()
.get("badges").getAsArray().forEach(customValue -> {
var obj = customValue.getAsObject();
var name = obj.get("name").getAsString();
var outline = obj.get("outlineColor").getAsNumber().intValue();
var fill = obj.get("fillColor").getAsNumber().intValue();
drawBadge(DrawContext, Text.literal(name).asOrderedText(), outline, fill, mouseX, mouseY);
});
} catch (Exception ignored) {
}
}
}
39 changes: 0 additions & 39 deletions src/client/java/dev/xdpxi/xdlib/mixin/client/TitleScreenMixin.java

This file was deleted.

74 changes: 0 additions & 74 deletions src/client/java/dev/xdpxi/xdlib/support.java

This file was deleted.

3 changes: 1 addition & 2 deletions src/client/resources/xdlib.client.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"MultiplayerServerListWidgetMixin",
"ProgressScreenMixin",
"ScreenAccessor",
"SoundSystemMixin",
"TitleScreenMixin"
"SoundSystemMixin"
],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit 90074c8

Please sign in to comment.