diff --git a/build.gradle b/build.gradle index 30afa912..16d1bfd4 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id 'org.parchmentmc.librarian.forgegradle' version '1.+' } -version = '2.5.1' +version = '2.6' group = 'com.cstav.genshinstrument' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'genshinstrument-1.19.4' diff --git a/public/updates.json b/public/updates.json index 45c41392..38ab177e 100644 --- a/public/updates.json +++ b/public/updates.json @@ -16,14 +16,16 @@ "2.4.1": "- Fixed instrument screen being present after item removal\n- API tweaks & fixes", "2.5": "- Update to version 1.19.4\n- GUI keyboard navigation", - "2.5.1": "- Fixed pitch slider being offset and not navigation-friendly" + "2.5.1": "- Fixed pitch slider being offset and not navigation-friendly", + + "2.6": "- Added the visual play ring from Genshin" }, "promos": { "1.19.3-latest": "2.4.1", "1.19.3-recommended": "2.4.1", - "1.19.4-latest": "2.5.1", - "1.19.4-recommended": "2.5.1" + "1.19.4-latest": "2.6", + "1.19.4-recommended": "2.6" } } \ No newline at end of file diff --git a/src/main/java/com/cstav/genshinstrument/util/ClientUtil.java b/src/main/java/com/cstav/genshinstrument/client/ClientUtil.java similarity index 85% rename from src/main/java/com/cstav/genshinstrument/util/ClientUtil.java rename to src/main/java/com/cstav/genshinstrument/client/ClientUtil.java index e33c5c8e..c756a618 100644 --- a/src/main/java/com/cstav/genshinstrument/util/ClientUtil.java +++ b/src/main/java/com/cstav/genshinstrument/client/ClientUtil.java @@ -1,4 +1,4 @@ -package com.cstav.genshinstrument.util; +package com.cstav.genshinstrument.client; import java.awt.Point; @@ -6,7 +6,10 @@ import net.minecraft.client.renderer.GameRenderer; import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +@OnlyIn(Dist.CLIENT) public class ClientUtil { /** diff --git a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteButton.java b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteButton.java index e82e8466..a2147dc4 100644 --- a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteButton.java +++ b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteButton.java @@ -4,6 +4,7 @@ import java.awt.Point; import java.util.ArrayList; +import com.cstav.genshinstrument.client.ClientUtil; import com.cstav.genshinstrument.client.config.ModClientConfigs; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.AbstractInstrumentScreen; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.note.animation.NoteAnimationController; @@ -11,7 +12,6 @@ import com.cstav.genshinstrument.networking.ModPacketHandler; import com.cstav.genshinstrument.networking.packets.instrument.InstrumentPacket; import com.cstav.genshinstrument.sound.NoteSound; -import com.cstav.genshinstrument.util.ClientUtil; import com.cstav.genshinstrument.util.CommonUtil; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteRing.java b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteRing.java index e0bce584..49bfb805 100644 --- a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteRing.java +++ b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/partial/note/NoteRing.java @@ -2,13 +2,19 @@ import java.awt.Point; +import com.cstav.genshinstrument.Main; +import com.cstav.genshinstrument.client.ClientUtil; +import com.cstav.genshinstrument.client.gui.screens.instrument.partial.AbstractInstrumentScreen; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.note.animation.RingAnimationController; -import com.cstav.genshinstrument.util.ClientUtil; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +@OnlyIn(Dist.CLIENT) public class NoteRing { public static final String RING_GLOB_FILENAME = "ring.png"; @@ -37,7 +43,7 @@ public void render() { note.colorTheme.getBlue() / 255f, alpha ); - ClientUtil.displaySprite(note.instrumentScreen.getResourceFromGlob(RING_GLOB_FILENAME)); + ClientUtil.displaySprite(new ResourceLocation(Main.MODID, AbstractInstrumentScreen.getGlobalRootPath() + RING_GLOB_FILENAME)); final Point ringCenter = ClientUtil.getInitCenter(note.getInitX(), note.getInitY(), NoteButton.getSize(), size); GuiComponent.blit(new PoseStack(), diff --git a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/vintagelyre/VintageNoteButton.java b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/vintagelyre/VintageNoteButton.java index 048a20e9..a3d988c6 100644 --- a/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/vintagelyre/VintageNoteButton.java +++ b/src/main/java/com/cstav/genshinstrument/client/gui/screens/instrument/vintagelyre/VintageNoteButton.java @@ -1,11 +1,11 @@ package com.cstav.genshinstrument.client.gui.screens.instrument.vintagelyre; +import com.cstav.genshinstrument.client.ClientUtil; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.AbstractGridInstrumentScreen; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.AbstractInstrumentScreen; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.note.NoteGridButton; import com.cstav.genshinstrument.client.gui.screens.instrument.partial.note.label.NoteLabelSupplier; import com.cstav.genshinstrument.sound.NoteSound; -import com.cstav.genshinstrument.util.ClientUtil; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiComponent;