diff --git a/gradle.properties b/gradle.properties index 7146da6..0804fae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,21 +4,21 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.6 -yarn_mappings=1.20.6+build.1 +minecraft_version=1.21 +yarn_mappings=1.21+build.2 #minecraft_version=1.20.1 #yarn_mappings=1.20.1+build.10 loader_version=0.15.11 # Mod Properties - mod_version = 3.1.1+fabric_1.20.6 + mod_version = 3.1.1+fabric_1.21 maven_group = me.emafire003.dev archives_base_name = coloredglowlib # Dependencies -fabric_version=0.98.0+1.20.6 -cca_version = 6.0.0-rc1 +fabric_version=0.100.1+1.21 +cca_version = 6.1.0 #Soft Dependencies fabricperms_version=0.2-SNAPSHOT diff --git a/src/main/java/me/emafire003/dev/coloredglowlib/ColoredGlowLibMod.java b/src/main/java/me/emafire003/dev/coloredglowlib/ColoredGlowLibMod.java index b88a1ee..d757297 100644 --- a/src/main/java/me/emafire003/dev/coloredglowlib/ColoredGlowLibMod.java +++ b/src/main/java/me/emafire003/dev/coloredglowlib/ColoredGlowLibMod.java @@ -1,6 +1,7 @@ package me.emafire003.dev.coloredglowlib; import net.minecraft.entity.Entity; +import net.minecraft.util.Identifier; import org.ladysnake.cca.api.v3.entity.EntityComponentFactoryRegistry; import org.ladysnake.cca.api.v3.entity.EntityComponentInitializer; import org.ladysnake.cca.api.v3.entity.RespawnCopyStrategy; @@ -63,6 +64,11 @@ public void onInitialize() { LOGGER.info("Complete!"); } + /**Used (internally) to get an identifier with this mod's namespace*/ + public static Identifier getIdentifier(String path){ + return Identifier.of(MOD_ID, path); + } + /** * Use this to get the ColoredGlowLib API instance and * use the methods to set colors and such diff --git a/src/main/java/me/emafire003/dev/coloredglowlib/component/ColorComponent.java b/src/main/java/me/emafire003/dev/coloredglowlib/component/ColorComponent.java index c7b623c..d505744 100644 --- a/src/main/java/me/emafire003/dev/coloredglowlib/component/ColorComponent.java +++ b/src/main/java/me/emafire003/dev/coloredglowlib/component/ColorComponent.java @@ -1,5 +1,6 @@ package me.emafire003.dev.coloredglowlib.component; +import me.emafire003.dev.coloredglowlib.ColoredGlowLibMod; import net.minecraft.entity.Entity; import net.minecraft.registry.RegistryWrapper; import org.ladysnake.cca.api.v3.component.ComponentKey; @@ -8,14 +9,11 @@ import org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent; import me.emafire003.dev.coloredglowlib.util.ColorUtils; import net.minecraft.nbt.NbtCompound; -import net.minecraft.util.Identifier; - -import static me.emafire003.dev.coloredglowlib.ColoredGlowLibMod.MOD_ID; public class ColorComponent implements ComponentV3, AutoSyncedComponent{ public static final ComponentKey COLOR_COMPONENT = - ComponentRegistry.getOrCreate(new Identifier(MOD_ID, "color_component"), ColorComponent.class); + ComponentRegistry.getOrCreate(ColoredGlowLibMod.getIdentifier("color_component"), ColorComponent.class); private final Entity self; diff --git a/src/main/java/me/emafire003/dev/coloredglowlib/component/GlobalColorComponent.java b/src/main/java/me/emafire003/dev/coloredglowlib/component/GlobalColorComponent.java index dbad6a2..92ad55f 100644 --- a/src/main/java/me/emafire003/dev/coloredglowlib/component/GlobalColorComponent.java +++ b/src/main/java/me/emafire003/dev/coloredglowlib/component/GlobalColorComponent.java @@ -1,5 +1,6 @@ package me.emafire003.dev.coloredglowlib.component; +import me.emafire003.dev.coloredglowlib.ColoredGlowLibMod; import net.minecraft.registry.RegistryWrapper; import org.ladysnake.cca.api.v3.component.ComponentKey; import org.ladysnake.cca.api.v3.component.ComponentRegistry; @@ -10,7 +11,6 @@ import net.minecraft.nbt.NbtCompound; import net.minecraft.scoreboard.Scoreboard; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -18,12 +18,10 @@ import java.util.List; import java.util.Optional; -import static me.emafire003.dev.coloredglowlib.ColoredGlowLibMod.MOD_ID; - public class GlobalColorComponent implements ComponentV3, AutoSyncedComponent{ public static final ComponentKey GLOBAL_COLOR_COMPONENT = - ComponentRegistry.getOrCreate(new Identifier(MOD_ID, "global_color_component"), GlobalColorComponent.class); + ComponentRegistry.getOrCreate(ColoredGlowLibMod.getIdentifier("global_color_component"), GlobalColorComponent.class); private final Scoreboard scoreboard; diff --git a/src/main/java/me/emafire003/dev/coloredglowlib/custom_data_animations/CGLResourceManager.java b/src/main/java/me/emafire003/dev/coloredglowlib/custom_data_animations/CGLResourceManager.java index f3fb245..a8371ba 100644 --- a/src/main/java/me/emafire003/dev/coloredglowlib/custom_data_animations/CGLResourceManager.java +++ b/src/main/java/me/emafire003/dev/coloredglowlib/custom_data_animations/CGLResourceManager.java @@ -26,7 +26,7 @@ public static void register(){ @Override public Identifier getFabricId() { - return new Identifier(ColoredGlowLibMod.MOD_ID, RESOURCE_PATH); + return ColoredGlowLibMod.getIdentifier(RESOURCE_PATH); } @Override