diff --git a/src/main/java/xyz/devcomp/elytralock/config/ConfigHandler.java b/src/main/java/xyz/devcomp/elytralock/config/ConfigHandler.java index a504338..0d7bfc8 100644 --- a/src/main/java/xyz/devcomp/elytralock/config/ConfigHandler.java +++ b/src/main/java/xyz/devcomp/elytralock/config/ConfigHandler.java @@ -11,7 +11,7 @@ import dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder; public class ConfigHandler { private boolean isLoaded = false; public static final ConfigClassHandler HANDLER = ConfigClassHandler.createBuilder(ConfigModel.class) - .id(new Identifier("elytralock", "config")) + .id(Identifier.of("elytralock", "config")) .serializer(config -> GsonConfigSerializerBuilder.create(config) .setPath(ElytraLock.LOADER.getConfigDir().resolve("elytra-lock.json")) .setJson5(true) diff --git a/src/main/java/xyz/devcomp/elytralock/events/HudRenderHandler.java b/src/main/java/xyz/devcomp/elytralock/events/HudRenderHandler.java index ea1b94f..5bed9da 100644 --- a/src/main/java/xyz/devcomp/elytralock/events/HudRenderHandler.java +++ b/src/main/java/xyz/devcomp/elytralock/events/HudRenderHandler.java @@ -4,6 +4,7 @@ import xyz.devcomp.elytralock.ElytraLock; import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; import net.minecraft.client.gui.DrawContext; +import net.minecraft.client.render.RenderTickCounter; import net.minecraft.client.util.Window; import net.minecraft.util.Identifier; @@ -11,9 +12,10 @@ public class HudRenderHandler implements HudRenderCallback { public static final int WIDTH = 16; public static final int HEIGHT = 16; - public void onHudRender(DrawContext context, float delta) { + @Override + public void onHudRender(DrawContext context, RenderTickCounter tickCounter) { // FIXME: Perhaps don't check whether the elytra is locked on every frame - Identifier icon = new Identifier("elytra-lock", + Identifier icon = Identifier.of("elytra-lock", "textures/gui/" + (ElytraLock.isLocked() ? "locked" : "unlocked") + ".png"); Window window = ElytraLock.client.getWindow();