Fixed GUI and building

This commit is contained in:
FlorianMichael 2023-06-08 20:18:39 +02:00
parent b396eccd9e
commit dbf346eef8
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
5 changed files with 13 additions and 8 deletions

View File

@ -27,4 +27,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ViaForge-1.12.2
path: build/libs/
path: mc1122/build/libs/

View File

@ -8,12 +8,13 @@ mod_name=ViaForge
mod_version=3.3.2
mod_base_package=de.florianmichael
# mixin
mixin_version=0.8.3
# via-version
vialoader_version=2.2.5-SNAPSHOT
viaversion_version=4.7.0
viabackwards_version=4.7.0
viarewind_version=2.0.4-SNAPSHOT
snake_yml_version=2.0
# libs
slf4j_version=2.0.7
mixin_version=0.8.3

View File

@ -88,7 +88,8 @@ def viaLibs = [
"com.viaversion:viarewind-core:${project.viarewind_version}",
"org.yaml:snakeyaml:${project.snake_yml_version}",
"net.raphimc:ViaLoader:${project.vialoader_version}"
"net.raphimc:ViaLoader:${project.vialoader_version}",
"org.slf4j:slf4j-api:${project.slf4j_version}"
]
dependencies {

View File

@ -38,6 +38,9 @@ public class ViaForge {
@Mod.EventHandler
public void init(FMLPreInitializationEvent event) {
VersionEnum.SORTED_VERSIONS.remove(VersionEnum.r1_7_6tor1_7_10);
VersionEnum.SORTED_VERSIONS.remove(VersionEnum.r1_7_2tor1_7_5);
ViaLoader.init(
null,
new VLLoader() {

View File

@ -80,12 +80,12 @@ public class GuiProtocolSelector extends GuiScreen {
@Override
protected int getSize() {
return VersionEnum.OFFICIAL_SUPPORTED_PROTOCOLS.size();
return VersionEnum.SORTED_VERSIONS.size();
}
@Override
protected void elementClicked(int i, boolean b, int i1, int i2) {
ViaForge.targetVersion = VersionEnum.OFFICIAL_SUPPORTED_PROTOCOLS.get(i);
ViaForge.targetVersion = VersionEnum.SORTED_VERSIONS.get(i);
}
@Override
@ -100,7 +100,7 @@ public class GuiProtocolSelector extends GuiScreen {
@Override
protected void drawSlot(int i, int i1, int i2, int i3, int i4, int i5, float v) {
final VersionEnum version = VersionEnum.OFFICIAL_SUPPORTED_PROTOCOLS.get(i);
final VersionEnum version = VersionEnum.SORTED_VERSIONS.get(i);
drawCenteredString(mc.fontRenderer,(ViaForge.targetVersion.getVersion() == version.getVersion() ? ChatFormatting.GREEN.toString() : ChatFormatting.DARK_RED.toString()) + version.getName(), width / 2, i2, -1);
}