From 5453dcf038531bc723ab5486e80c4309174cd06a Mon Sep 17 00:00:00 2001 From: Puqns67 Date: Tue, 9 Jul 2024 00:35:14 +0800 Subject: [PATCH] chore: some small improvements --- .../java/icu/puqns67/skintypefix/Config.java | 2 +- .../icu/puqns67/skintypefix/SkinTypeFix.java | 8 ++++---- .../java/icu/puqns67/skintypefix/util/Utils.java | 5 ++--- src/main/resources/META-INF/neoforge.mods.toml | 16 ++++++++-------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main/java/icu/puqns67/skintypefix/Config.java b/src/main/java/icu/puqns67/skintypefix/Config.java index a118a9e..09c02ae 100644 --- a/src/main/java/icu/puqns67/skintypefix/Config.java +++ b/src/main/java/icu/puqns67/skintypefix/Config.java @@ -8,7 +8,7 @@ import net.neoforged.fml.event.config.ModConfigEvent; import net.neoforged.neoforge.common.ModConfigSpec; @OnlyIn(Dist.CLIENT) -@EventBusSubscriber(modid = SkinTypeFix.MODID, bus = EventBusSubscriber.Bus.MOD) +@EventBusSubscriber(modid = SkinTypeFix.ID, bus = EventBusSubscriber.Bus.MOD) public class Config { private static final ModConfigSpec.Builder BUILDER = new ModConfigSpec.Builder(); diff --git a/src/main/java/icu/puqns67/skintypefix/SkinTypeFix.java b/src/main/java/icu/puqns67/skintypefix/SkinTypeFix.java index cdb04c7..d870426 100644 --- a/src/main/java/icu/puqns67/skintypefix/SkinTypeFix.java +++ b/src/main/java/icu/puqns67/skintypefix/SkinTypeFix.java @@ -1,6 +1,5 @@ package icu.puqns67.skintypefix; -import com.mojang.logging.LogUtils; import net.neoforged.api.distmarker.Dist; import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.bus.api.IEventBus; @@ -9,12 +8,13 @@ import net.neoforged.fml.common.Mod; import net.neoforged.fml.config.ModConfig; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @OnlyIn(Dist.CLIENT) -@Mod(SkinTypeFix.MODID) +@Mod(SkinTypeFix.ID) public class SkinTypeFix { - public static final String MODID = "skintypefix"; - public static final Logger LOGGER = LogUtils.getLogger(); + public static final String ID = "skintypefix"; + public static final Logger LOGGER = LoggerFactory.getLogger(ID); public SkinTypeFix(IEventBus modEventBus, ModContainer modContainer) { modEventBus.addListener(this::setup); diff --git a/src/main/java/icu/puqns67/skintypefix/util/Utils.java b/src/main/java/icu/puqns67/skintypefix/util/Utils.java index 9052fe8..8d87937 100644 --- a/src/main/java/icu/puqns67/skintypefix/util/Utils.java +++ b/src/main/java/icu/puqns67/skintypefix/util/Utils.java @@ -1,12 +1,11 @@ package icu.puqns67.skintypefix.util; +import net.minecraft.Util; import net.minecraft.client.resources.PlayerSkin; import java.util.UUID; public class Utils { - private static final UUID INVALID_UUID = new UUID(0, 0); - public static PlayerSkin.Model reverseModelType(PlayerSkin.Model type) { return switch (type) { case SLIM -> PlayerSkin.Model.WIDE; @@ -15,6 +14,6 @@ public class Utils { } public static boolean isInvalidUUID(UUID uuid) { - return INVALID_UUID.equals(uuid); + return Util.NIL_UUID.equals(uuid); } } diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml index e1ee92c..9d50017 100644 --- a/src/main/resources/META-INF/neoforge.mods.toml +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -16,13 +16,13 @@ description='''${mod_description}''' config="${mod_id}.mixins.json" [[dependencies.${mod_id}]] - modId="minecraft" - type="required" - versionRange="${minecraft_version_range}" - side="CLIENT" +modId="minecraft" +type="required" +versionRange="${minecraft_version_range}" +side="CLIENT" [[dependencies.${mod_id}]] - modId="neoforge" - type="required" - versionRange="${neoforge_version_range}" - side="CLIENT" +modId="neoforge" +type="required" +versionRange="${neoforge_version_range}" +side="CLIENT"