diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 805668e..dad50a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,4 +34,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: Artifacts - path: build/libs/ \ No newline at end of file + path: versions/**/build/libs/ diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 8f07c56..0000000 --- a/build.gradle +++ /dev/null @@ -1,64 +0,0 @@ -plugins { - id 'fabric-loom' version '1.6-SNAPSHOT' - id 'maven-publish' -} - -version = project.mod_version -group = project.maven_group - -base { - archivesName = project.archives_base_name -} - -repositories { - maven { url = "https://jitpack.io" } - maven { url = "https://maven.isxander.dev/releases" } - maven { url = "https://maven.terraformersmc.com/releases" } - maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" } -} - -loom { - runs { - remove server - } -} - -dependencies { - modImplementation("dev.isxander:yet-another-config-lib:${yaclVersion}-fabric") - - modImplementation("com.terraformersmc:modmenu:${project.modMenuVersion}") - - // To change the versions see the gradle.properties file - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - - // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - - // DevAuth. Lets us log in with our own Minecraft account. Useful for testing tab features. - modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:${project.devauthVersion}") -} - -processResources { - inputs.property "version", project.version - - filesMatching("fabric.mod.json") { - expand "version": project.version - } -} - -tasks.withType(JavaCompile).configureEach { - it.options.release = 21 -} - -java { - sourceCompatibility = JavaVersion.VERSION_21 - targetCompatibility = JavaVersion.VERSION_21 -} - -jar { - from("LICENSE") { - rename { "${it}_${project.base.archivesName.get()}"} - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..49d3dd9 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,80 @@ +import org.polyfrost.gradle.util.noServerRunConfigs + +plugins { + id(libs.plugins.pgt.main.get().pluginId) + id(libs.plugins.pgt.defaults.repo.get().pluginId) + id(libs.plugins.pgt.defaults.loom.get().pluginId) + id(libs.plugins.pgt.defaults.java.get().pluginId) + alias(libs.plugins.blossom) + id(libs.plugins.shadow.get().pluginId) + alias(libs.plugins.kotlin) apply false +} + +version = project.properties["mod_version"] as String +group = project.properties["maven_group"] as String + +repositories { + mavenCentral() + maven("https://repo.polyfrost.org/releases") + maven("https://maven.isxander.dev/releases") + maven("https://maven.terraformersmc.com/releases") +} + +java { + toolchain { + when(platform.mcVersion) { + in 12001..12004 -> { + languageVersion.set(JavaLanguageVersion.of(17)) + } + else -> { + languageVersion.set(JavaLanguageVersion.of(21)) + } + } + } +} + +loom { + noServerRunConfigs() +} + +dependencies { + // Mixin Extras because PGT doesn't include it + implementation(annotationProcessor(libs.mixinextras.get())!!) + + val modMenuVersion = when(platform.mcVersion) { + 12001 -> "7.2.2" + 12004 -> "9.2.0-beta.2" + else -> "10.0.0-beta.1" + } + + val fabricApiVersion = when(platform.mcVersion) { + 12001 -> "0.92.1" + 12004 -> "0.97.0" + else -> "0.98.0" + } + + val yaclVersion = when(platform.mcVersion) { + 12001 -> "3.4.2+1.20.1-fabric" + 12004 -> "3.4.2+1.20.4-fabric" + else -> "3.4.2+1.20.5-fabric" + } + + modImplementation("com.terraformersmc:modmenu:${modMenuVersion}") + modImplementation("net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}+${platform.mcVersionStr}") + modImplementation("dev.isxander:yet-another-config-lib:${yaclVersion}") + + // DevAuth. Lets us log in with our own Minecraft account. Useful for testing tab features. + modRuntimeOnly("me.djtheredstoner:DevAuth-${platform.loaderStr}:1.2.0") +} + +tasks.processResources { + filesMatching("fabric.mod.json") { + expand(mapOf("version" to project.version)) + } +} + +tasks.jar { + from("LICENSE") { + rename { "${it}_${project.base.archivesName.get()}" } + } +} diff --git a/gradle.properties b/gradle.properties index e9dc1d8..a13cfa5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,19 +2,10 @@ org.gradle.jvmargs=-Xmx1G org.gradle.parallel=true -# Fabric Properties -# check these on https://fabricmc.net/develop -minecraft_version=1.20.5 -yarn_mappings=1.20.5+build.1 -loader_version=0.15.10 +# PGT +polyfrost.defaults.loom=2 # Mod Properties -mod_version=1.3.1 +mod_version=1.3.2 maven_group=dev.microcontrollers.nametagtweaks archives_base_name=nametagtweaks - -# Dependencies -fabric_version=0.97.5+1.20.5 -modMenuVersion=10.0.0-beta.1 -yaclVersion=3.4.0+1.20.5 -devauthVersion=1.2.0 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..ebba8a6 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,25 @@ +[versions] +kotlin = "1.9.23" + +pgt = "0.5.1" +shadow = "8.1.1" +blossom = "1.3.2" + +mixinextras = "0.3.5" + +[libraries] +mixinextras = { module = "io.github.llamalad7:mixinextras-fabric", version.ref = "mixinextras" } + + +[plugins] +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } + +pgt-main = { id = "org.polyfrost.multi-version", version.ref = "pgt" } +pgt-root = { id = "org.polyfrost.multi-version.root", version.ref = "pgt" } +pgt-default = { id = "org.polyfrost.defaults", version.ref = "pgt" } +pgt-defaults-repo = { id = "org.polyfrost.defaults.repo", version.ref = "pgt" } +pgt-defaults-loom = { id = "org.polyfrost.defaults.loom", version.ref = "pgt" } +pgt-defaults-java = { id = "org.polyfrost.defaults.java", version.ref = "pgt" } + +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } +blossom = { id = "net.kyori.blossom", version.ref = "blossom" } diff --git a/root.gradle.kts b/root.gradle.kts new file mode 100644 index 0000000..7d3c5be --- /dev/null +++ b/root.gradle.kts @@ -0,0 +1,11 @@ +plugins { + alias(libs.plugins.pgt.root) + alias(libs.plugins.kotlin) apply false +} + +preprocess { + val fabric12004 = createNode("1.20.4-fabric", 12004, "yarn") + val fabric12006 = createNode("1.20.6-fabric", 12006, "yarn") + + fabric12006.link(fabric12004) +} diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 75c4d72..0000000 --- a/settings.gradle +++ /dev/null @@ -1,10 +0,0 @@ -pluginManagement { - repositories { - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' - } - mavenCentral() - gradlePluginPortal() - } -} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..3f11438 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,20 @@ +pluginManagement { + repositories { + maven("https://repo.polyfrost.org/releases") + mavenCentral() + gradlePluginPortal() + } +} + +listOf( + "1.20.4-fabric", + "1.20.6-fabric" +).forEach { version -> + include(":$version") + project(":$version").apply { + projectDir = file("versions/$version") + buildFileName = "../../build.gradle.kts" + } +} + +rootProject.buildFileName = "root.gradle.kts" diff --git a/src/main/java/dev/microcontrollers/nametagtweaks/NametagShadowFix.java b/src/main/java/dev/microcontrollers/nametagtweaks/NametagShadowFix.java new file mode 100644 index 0000000..847348a --- /dev/null +++ b/src/main/java/dev/microcontrollers/nametagtweaks/NametagShadowFix.java @@ -0,0 +1,10 @@ +package dev.microcontrollers.nametagtweaks; + +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.text.OrderedText; +import org.joml.Matrix4f; + +public interface NametagShadowFix { + void nametagTweaks$drawNametagShadow(OrderedText text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, TextRenderer.TextLayerType layerType, int backgroundColor, int light); +} \ No newline at end of file diff --git a/src/main/java/dev/microcontrollers/nametagtweaks/config/NametagTweaksConfig.java b/src/main/java/dev/microcontrollers/nametagtweaks/config/NametagTweaksConfig.java index fdd2190..a38ebb5 100644 --- a/src/main/java/dev/microcontrollers/nametagtweaks/config/NametagTweaksConfig.java +++ b/src/main/java/dev/microcontrollers/nametagtweaks/config/NametagTweaksConfig.java @@ -7,9 +7,9 @@ import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; import dev.isxander.yacl3.api.controller.IntegerSliderControllerBuilder; import dev.isxander.yacl3.api.controller.TickBoxControllerBuilder; -import dev.isxander.yacl3.config.ConfigEntry; -import dev.isxander.yacl3.config.ConfigInstance; -import dev.isxander.yacl3.config.GsonConfigInstance; +import dev.isxander.yacl3.config.v2.api.ConfigClassHandler; +import dev.isxander.yacl3.config.v2.api.SerialEntry; +import dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder; import dev.isxander.yacl3.gui.controllers.ColorController; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.gui.screen.Screen; @@ -18,21 +18,22 @@ import java.awt.*; public class NametagTweaksConfig { - public static final ConfigInstance CONFIG = GsonConfigInstance.createBuilder(NametagTweaksConfig.class) - .setPath(FabricLoader.getInstance().getConfigDir().resolve("nametagtweaks.json")) + public static final ConfigClassHandler CONFIG = ConfigClassHandler.createBuilder(NametagTweaksConfig.class) + .serializer(config -> GsonConfigSerializerBuilder.create(config) + .setPath(FabricLoader.getInstance().getConfigDir().resolve("nametagtweaks.json")) + .build()) .build(); - @ConfigEntry public boolean removeNametags = false; - @ConfigEntry public boolean showOwnNametags = false; - @ConfigEntry public boolean hideEntityNametagsInHiddenHud = true; - @ConfigEntry public boolean hidePlayerNametagsInHiddenHud = false; - @ConfigEntry public boolean hideArmorStandNametagsInHiddenHud = false; - @ConfigEntry public int nametagOffset = 0; - @ConfigEntry public Color nametagColor = new Color(0, 0, 0, 63); - @ConfigEntry public boolean nametagTextShadow = false; - @ConfigEntry public float nametagScale = 1F; + @SerialEntry public boolean removeNametags = false; + @SerialEntry public boolean showOwnNametags = false; + @SerialEntry public boolean hideEntityNametagsInHiddenHud = true; + @SerialEntry public boolean hidePlayerNametagsInHiddenHud = false; + @SerialEntry public boolean hideArmorStandNametagsInHiddenHud = false; + @SerialEntry public int nametagOffset = 0; + @SerialEntry public Color nametagColor = new Color(0, 0, 0, 63); + @SerialEntry public boolean nametagTextShadow = false; + @SerialEntry public float nametagScale = 1F; - @SuppressWarnings("deprecation") public static Screen configScreen(Screen parent) { return YetAnotherConfigLib.create(CONFIG, ((defaults, config, builder) -> builder .title(Text.literal("Nametag Tweaks")) @@ -84,7 +85,7 @@ public static Screen configScreen(Screen parent) { .build()) .option(Option.createBuilder(boolean.class) .name(Text.literal("Nametag Text Shadow")) - .description(OptionDescription.of(Text.of("Adds a textshadow to nametags. The shadow renders in front of the regular text, which seems to be a vanilla Minecraft bug."))) + .description(OptionDescription.of(Text.of("Adds text shadow to nametags."))) .binding(defaults.nametagTextShadow, () -> config.nametagTextShadow, newVal -> config.nametagTextShadow = newVal) .controller(TickBoxControllerBuilder::create) .build()) diff --git a/src/main/java/dev/microcontrollers/nametagtweaks/mixin/EntityRendererMixin.java b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/EntityRendererMixin.java index 295ce2b..7aecdd4 100644 --- a/src/main/java/dev/microcontrollers/nametagtweaks/mixin/EntityRendererMixin.java +++ b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/EntityRendererMixin.java @@ -1,14 +1,21 @@ package dev.microcontrollers.nametagtweaks.mixin; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import dev.microcontrollers.nametagtweaks.NametagShadowFix; import dev.microcontrollers.nametagtweaks.config.NametagTweaksConfig; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.font.TextRenderer; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.Entity; import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.text.Text; +import org.joml.Matrix4f; +import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyArg; @@ -16,33 +23,44 @@ @Mixin(EntityRenderer.class) public class EntityRendererMixin { + @Shadow @Final private TextRenderer textRenderer; + @Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true) + //#if MC >= 1.20.6 public void hideNametags(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, float tickDelta, CallbackInfo ci) { - if (NametagTweaksConfig.CONFIG.getConfig().removeNametags || - (NametagTweaksConfig.CONFIG.getConfig().hideEntityNametagsInHiddenHud && !MinecraftClient.isHudEnabled() && !entity.isPlayer()) || - (NametagTweaksConfig.CONFIG.getConfig().hideArmorStandNametagsInHiddenHud && !MinecraftClient.isHudEnabled() && entity instanceof ArmorStandEntity)) + //#else + //$$ public void hideNametags(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) { + //#endif + if (NametagTweaksConfig.CONFIG.instance().removeNametags || + (NametagTweaksConfig.CONFIG.instance().hideEntityNametagsInHiddenHud && !MinecraftClient.isHudEnabled() && !entity.isPlayer()) || + (NametagTweaksConfig.CONFIG.instance().hideArmorStandNametagsInHiddenHud && !MinecraftClient.isHudEnabled() && entity instanceof ArmorStandEntity)) ci.cancel(); } @Inject(method = "renderLabelIfPresent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I", shift = At.Shift.BEFORE, ordinal = 0)) + //#if MC >= 1.20.6 public void nametagScale(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, float tickDelta, CallbackInfo ci) { - float scale = NametagTweaksConfig.CONFIG.getConfig().nametagScale; + //#else + //$$ public void nametagScale(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) { + //#endif + float scale = NametagTweaksConfig.CONFIG.instance().nametagScale; matrices.scale(scale, scale, scale); } @ModifyArg(method = "renderLabelIfPresent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I"), index = 2) public float changeNametagHeight(float y) { - return y - NametagTweaksConfig.CONFIG.getConfig().nametagOffset; + return y - NametagTweaksConfig.CONFIG.instance().nametagOffset; } - @ModifyArg(method = "renderLabelIfPresent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I"), index = 4) - public boolean addNametagShadow(boolean shadow) { - return NametagTweaksConfig.CONFIG.getConfig().nametagTextShadow; + @WrapOperation(method = "renderLabelIfPresent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I")) + private int addNametagShadow(TextRenderer instance, Text text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, TextRenderer.TextLayerType layerType, int backgroundColor, int light, Operation original) { + if (NametagTweaksConfig.CONFIG.instance().nametagTextShadow) ((NametagShadowFix) textRenderer).nametagTweaks$drawNametagShadow(text.asOrderedText(), x, y, color, true, matrix, vertexConsumers, layerType, backgroundColor, light); + return original.call(instance, text, x, y, color, shadow, matrix, vertexConsumers, layerType, backgroundColor, light); } @ModifyArg(method = "renderLabelIfPresent", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/text/Text;FFIZLorg/joml/Matrix4f;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/font/TextRenderer$TextLayerType;II)I", ordinal = 0), index = 8) public int changeNametagBackground(int color) { - return NametagTweaksConfig.CONFIG.getConfig().nametagColor.getRGB(); + return NametagTweaksConfig.CONFIG.instance().nametagColor.getRGB(); } } diff --git a/src/main/java/dev/microcontrollers/nametagtweaks/mixin/LivingEntityRendererMixin.java b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/LivingEntityRendererMixin.java index de6acbc..2aea987 100644 --- a/src/main/java/dev/microcontrollers/nametagtweaks/mixin/LivingEntityRendererMixin.java +++ b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/LivingEntityRendererMixin.java @@ -20,8 +20,8 @@ public class LivingEntityRendererMixin { @Inject(method = "hasLabel(Lnet/minecraft/entity/LivingEntity;)Z", at = @At(value = "TAIL", shift = At.Shift.BEFORE), cancellable = true) public void showInThirdPerson(LivingEntity livingEntity, CallbackInfoReturnable cir) { cir.setReturnValue( - (MinecraftClient.isHudEnabled() || !(NametagTweaksConfig.CONFIG.getConfig().hidePlayerNametagsInHiddenHud && livingEntity == MinecraftClient.getInstance().player)) - && (NametagTweaksConfig.CONFIG.getConfig().showOwnNametags + (MinecraftClient.isHudEnabled() || !(NametagTweaksConfig.CONFIG.instance().hidePlayerNametagsInHiddenHud && livingEntity == MinecraftClient.getInstance().player)) + && (NametagTweaksConfig.CONFIG.instance().showOwnNametags || livingEntity != MinecraftClient.getInstance().getCameraEntity()) && !livingEntity.isInvisibleTo(MinecraftClient.getInstance().player) && !livingEntity.hasPassengers() diff --git a/src/main/java/dev/microcontrollers/nametagtweaks/mixin/TextRendererMixin.java b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/TextRendererMixin.java new file mode 100644 index 0000000..e530774 --- /dev/null +++ b/src/main/java/dev/microcontrollers/nametagtweaks/mixin/TextRendererMixin.java @@ -0,0 +1,23 @@ +package dev.microcontrollers.nametagtweaks.mixin; + +import dev.microcontrollers.nametagtweaks.NametagShadowFix; +import net.minecraft.client.font.TextRenderer; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.text.OrderedText; +import org.joml.Matrix4f; +import org.joml.Vector3f; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +@Mixin(TextRenderer.class) +public abstract class TextRendererMixin implements NametagShadowFix { + @Shadow protected abstract float drawLayer(OrderedText text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumerProvider, TextRenderer.TextLayerType layerType, int underlineColor, int light); + + // the issue is with the Vector3f used in the drawInternal method, just need to negate the z for shadow rendering + @Override + public void nametagTweaks$drawNametagShadow(OrderedText text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, TextRenderer.TextLayerType layerType, int backgroundColor, int light) { + this.drawLayer(text, x, y, color, true, matrix, vertexConsumers, layerType, backgroundColor, light); + matrix.translate(new Vector3f(0.0F, 0.0F, -0.03F)); + } + +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b5a638d..f427ba7 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -12,9 +12,9 @@ "sources": "https://github.com/MicrocontrollersDev/NametagTweaks", "issues": "https://github.com/MicrocontrollersDev/NametagTweaks/issues" }, - "license": "LGPLV3", + "license": "LGPLv3", "icon": "assets/nametagtweaks/icon.png", - "environment": "*", + "environment": "client", "entrypoints": { "main": [ "dev.microcontrollers.nametagtweaks.NametagTweaks" @@ -27,16 +27,17 @@ "nametagtweaks.mixins.json" ], "depends": { - "fabricloader": ">=0.15.10", - "minecraft": "~1.20.5", - "java": ">=21", + "fabricloader": ">=0.14", + "minecraft": ">=1.20 <=1.20.6", + "java": ">=17", "fabric-api": "*", "yet_another_config_lib_v3": "*" }, "custom": { "modmenu": { "links": { - "modmenu.discord": "https://discord.gg/rejfv9kFJj" + "modmenu.discord": "https://discord.gg/rejfv9kFJj", + "modmenu.modrinth": "https://modrinth.com/mod/nametagtweaks" }, "update_checker": true } diff --git a/src/main/resources/nametagtweaks.mixins.json b/src/main/resources/nametagtweaks.mixins.json index 7fa7b8f..bae0148 100644 --- a/src/main/resources/nametagtweaks.mixins.json +++ b/src/main/resources/nametagtweaks.mixins.json @@ -1,12 +1,15 @@ { - "required": true, - "package": "dev.microcontrollers.nametagtweaks.mixin", - "compatibilityLevel": "JAVA_21", - "mixins": [ - "EntityRendererMixin", - "LivingEntityRendererMixin" - ], - "injectors": { - "defaultRequire": 1 - } + "required": true, + "package": "dev.microcontrollers.nametagtweaks.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + "EntityRendererMixin", + "LivingEntityRendererMixin" + ], + "injectors": { + "defaultRequire": 1 + }, + "client": [ + "TextRendererMixin" + ] } \ No newline at end of file diff --git a/versions/mainProject b/versions/mainProject new file mode 100644 index 0000000..304eaac --- /dev/null +++ b/versions/mainProject @@ -0,0 +1 @@ +1.20.6-fabric \ No newline at end of file