Improve Some Things

This commit is contained in:
FlorianMichael 2021-03-28 04:56:09 +02:00
parent cb34eca8bc
commit 4f95385513
23 changed files with 45 additions and 180 deletions

View File

@ -7,7 +7,7 @@ buildscript {
maven { url 'https://files.minecraftforge.net/maven' }
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://repo.spongepowered.org/maven' }
maven { url 'https://repo.spongepowered.org/repository/maven-public' }
}
dependencies {
@ -28,13 +28,12 @@ repositories {
mavenCentral()
jcenter()
maven {
name = 'spongepowered-repo'
url = 'http://repo.spongepowered.org/maven/'
maven {
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
version = "b1"
version = "1.0.0.0"
group = "de.flori2007.viaforge"
archivesBaseName = "ViaForge"
@ -43,7 +42,7 @@ targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'windows-1252'
minecraft {
version = "1.12.2-14.23.5.2847"
version = "1.12.2-14.23.5.2768"
runDir = 'run'
mappings = "stable_39"
makeObfSourceJar = true
@ -62,11 +61,14 @@ repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://repo.spongepowered.org/maven/' }
maven {
name = 'spongepowered-repo'
url = 'https://repo.spongepowered.org/maven/'
}
}
dependencies {
compile("org.spongepowered:mixin:0.7.10-SNAPSHOT") {
compile("org.spongepowered:mixin:0.8") {
exclude module: "launchwrapper"
}
}

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.2.1-bin.zip
distributionUrl=https://services.gradle.org/distributions/gradle-4.9-bin.zip

View File

@ -46,10 +46,11 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.logging.Logger;
@Mod(modid = "viaforge", useMetadata = true)
@Mod(modid = "viaforge")
public class ViaFabric {
public static int clientSideVersion = 340;
public static int nativeVersion = 340;
public static int clientSideVersion;
public static String lastServer = "";
public static final Logger JLOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaFabric"));
@ -69,6 +70,7 @@ public class ViaFabric {
}
public void onInitialize() {
clientSideVersion = nativeVersion;
Via.init(ViaManager.builder()
.injector(new VRInjector())

View File

@ -55,7 +55,8 @@ public class GuiProtocolSelector extends GuiScreen {
this.width / 4, 6, 16777215);
GL11.glPopMatrix();
drawString(this.fontRenderer, "by Flori2007", 1, 1, -1);
drawString(this.fontRenderer, "by EnZaXD/Flori2007", 1, 1, -1);
drawString(this.fontRenderer, "Discord: EnZaXD#6257", 1, 11, -1);
super.drawScreen(p_drawScreen_1_, p_drawScreen_2_, p_drawScreen_3_);
}

View File

@ -10,6 +10,7 @@ import java.util.Map;
public class MixinLoader implements IFMLLoadingPlugin {
public MixinLoader() {
System.out.println("Starting MixinBootstrap from IFMLLoadingPlugin");
MixinBootstrap.init();
Mixins.addConfiguration("mixins.viaforge.json");
MixinEnvironment.getDefaultEnvironment().setSide(MixinEnvironment.Side.CLIENT);

View File

@ -0,0 +1,24 @@
package de.flori2007.viaforge.injection.mixins;
import com.github.creeper123123321.viafabric.ViaFabric;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiIngameMenu;
import net.minecraft.client.gui.GuiScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GuiIngameMenu.class)
public abstract class MixinGuiIngameMenu extends GuiScreen {
@Inject(method = "drawScreen", at = @At("RETURN"))
public void injectDrawScreen(int mouseX, int mouseY, float partialTicks, CallbackInfo ci) {
if (ViaFabric.clientSideVersion != ViaFabric.nativeVersion) {
String text = ChatFormatting.GOLD.toString() + ChatFormatting.BOLD.toString() + "ViaForge is active! Selected Version: " + ViaFabric.nativeVersion;
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow(text, width / 2 -
(Minecraft.getMinecraft().fontRenderer.getStringWidth(text) / 2), 1, -1);
}
}
}

View File

@ -1,12 +0,0 @@
# WARNING
# I cannot guarantee that this mod is allowed on every (or even any) server. This mod may cause problems with anti cheat plugins. USE AT OWN RISK
# This option enables client-side transforming (can also be enabled in-game)
enable-client-side: false
# This option sets the protocol version to be used when connection to the server (can also be changed in-game)
client-side-version: -1
# Hides VIA button from multiplayer menu.
hide-button: false
# List of servers which ViaFabric will force disabling transforming on client-side. It can be overwritten by setting per-server version.
# This isn't always the address in multiplayer GUI. It will use the SRV record pointer when present. Check the game log for the address.
# Uses https://wiki.vg/Mojang_API#Blocked_Servers format (mc.example.com, *.example.com, 192.168.0.1, 192.168.*)
client-side-force-disable: ["hypixel.net", "*.hypixel.net", "hivemc.com", "*.hivemc.com", "hivemc.eu", "*.hivemc.eu"]

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Protokoll Version
gui.enable_client_side_button=ViaVersion aktivieren
gui.enable_client_side.question=Bist du dir sicher, dass du den clientseitigen Modus aktivieren möchtest?
gui.enable_client_side.warning=Ich kann nicht garantieren, dass diese Mod auf jedem (oder überhaupt einem) Server erlaubt ist. Diese Mod könnte eventuell Probleme mit Anti-Cheat Plugins hervorrufen. VERWENDUNG AUF EIGENE GEFAHR.
gui.enable_client_side.enable=Aktivieren
gui.viafabric_config.title=ViaFabric-Konfigurationen
gui.client_side.enable=Clientseitig aktivieren
gui.client_side.disable=Clientseitig deaktivieren
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=VIA Button ausblenden
gui.hide_via_button.disable=VIA Button anzeigen
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Protocol Version
gui.enable_client_side_button=Enable ViaVersion
gui.enable_client_side.question=Are you sure you want to enable client-side mode?
gui.enable_client_side.warning=I cannot guarantee that this mod is allowed on every (or even any) server. This mod may cause problems with anti-cheat plugins. USE AT OWN RISK.
gui.enable_client_side.enable=Enable
gui.viafabric_config.title=ViaFabric Configurations
gui.client_side.enable=Enable client-side
gui.client_side.disable=Disable client-side
gui.ping_version.translated"=VIA: %s
gui.hide_via_button.enable=Hide VIA button
gui.hide_via_button.disable=Show VIA button
gui.via_button="VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Versión del protocolo
gui.enable_client_side_button=Activar ViaVersion
gui.enable_client_side.question=¿Estás seguro de que quieres habilitar el modo de lado del cliente?
gui.enable_client_side.warning=No puedo garantizar que este mod esté permitido en todos (o incluso en cualquier) los servidores. Este mod puede causar problemas con los plugins anti-cheat. EL USO DE ESTE MOD ES BAJO SU PROPIO RIESGO.
gui.enable_client_side.enable=Activar
gui.viafabric_config.title=Configuraciones de ViaFabric
gui.client_side.enable=Activar el lado del cliente
gui.client_side.disable=Desactivar el lado del cliente
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Ocultar el botón VIA
gui.hide_via_button.disable=Mostrar el botón VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Protokolli versioon
gui.enable_client_side_button=Luba ViaVersion
gui.enable_client_side.question=Kas soovid kindlasti lubada kliendipoolse režiimi?
gui.enable_client_side.warning=Ma ei saa garanteerida selle modi lubamist igas (mistahes) serveris. See mod võib põhjustada sohivastaste pluginatega probleeme. KASUTA OMAL VASTUTUSEL.
gui.enable_client_side.enable=Luba
gui.viafabric_config.title=ViaFabricu seadistused
gui.client_side.enable=Luba kliendipoolne
gui.client_side.disable=Keela kliendipoolne
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Peida VIA nupp
gui.hide_via_button.disable=Kuva VIA nuppu
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Version du protocole
gui.enable_client_side_button=Activer ViaVersion
gui.enable_client_side.question=Êtes vous sûr de vouloir activer le mode coté client ?
gui.enable_client_side.warning=Je ne peux pas vous garantir que ce mod est autorisé dans tous (ou même aucun) serveur. Ce mod peut causer des problèmes avec les plugin anti-cheat. À UTILISEZ À VOS RISQUES ET PERILS.
gui.enable_client_side.enable=Activer
gui.viafabric_config.title=Configuration de ViaFabric
gui.client_side.enable=Activer coté client
gui.client_side.disable=Désactiver coté client
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Cacher le bouton VIA
gui.hide_via_button.disable=Montrer le bouton VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Versione del protocollo
gui.enable_client_side_button=Attivare ViaVersion
gui.enable_client_side.question=Siete sicuri di voler attivare la modalità lato cliente?
gui.enable_client_side.warning=Non posso garantire che questo mod sia consentito su ogni server (o anche solo su uno qualsiasi). Questo mod può causare problemi con i plugin anti-cheat. USO A PROPRIO RISCHIO E PERICOLO.
gui.enable_client_side.enable=Attivare
gui.viafabric_config.title=Configurazioni ViaFabric
gui.client_side.enable=Attivare lato cliente
gui.client_side.disable=Disattivare lato cliente
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Nascondi il pulsante VIA
gui.hide_via_button.disable=Mostra il pulsante VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=プロトコルバージョン
gui.enable_client_side_button=ViaVersionを有効にする
gui.enable_client_side.question=本当にクライアントサイドモードを有効にしますか?
gui.enable_client_side.warning=私はこのMODがすべての(あるいはどのサーバーでも)許可されていることを保証することはできません。このMODはアンチチートプラグインの問題を引き起こす可能性があります。自己責任で使用してください。
gui.enable_client_side.enable=有効化
gui.viafabric_config.title=ViaFabricの構成
gui.client_side.enable=クライアント側を有効にする
gui.client_side.disable=クライアント側を無効にする
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=VIAボタンを隠す
gui.hide_via_button.disable=VIAボタンを表示
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Protocolversie
gui.enable_client_side_button=Schakel ViaVersion in
gui.enable_client_side.question=Weet u zeker dat u de client-side modus wilt inschakelen?
gui.enable_client_side.warning=Ik kan niet garanderen dat deze mod op elke (of zelfs maar één) server is toegestaan. Deze mod kan problemen veroorzaken met anti-cheat plugins. GEBRUIK OP EIGEN RISICO.
gui.enable_client_side.enable=Schakel in
gui.viafabric_config.title=ViaFabric-configuraties
gui.client_side.enable=Klantenservice inschakelen
gui.client_side.disable=Cliëntenservice uitschakelen
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=VIA-knop verbergen
gui.hide_via_button.disable=Toon VIA-knop
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Wersja protokołu
gui.enable_client_side_button=Włącz ViaVersion
gui.enable_client_side.question=Jesteś pewien, że chcesz włączyć tryb client-side?
gui.enable_client_side.warning=Nie możemy zagwarantować, że ten mod jest dozwolony na każdym (lub jakimkolwiek) serwerze. Ten mod może powodować problemy z anty-cheatami. UŻYWASZ NA WŁASNE RYZYKO!.
gui.enable_client_side.enable=Włączyć
gui.viafabric_config.title=Konfiguracje ViaFabric
gui.client_side.enable=Włączenie po stronie klienta
gui.client_side.disable=Wyłączenie po stronie klienta
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Ukrycie przycisku VIA
gui.hide_via_button.disable=Pokaż przycisk VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Versão do protocolo
gui.enable_client_side_button=Habilitar ViaVersion
gui.enable_client_side.question=Você tem certeza de que deseja habilitar o modo cliente?
gui.enable_client_side.warning=Não posso garantir que este mod seja permitido em todos os (ou mesmo em quaisquer) servidores. Esse poderá causar problemas com plugins anti-trapaça. USE POR SUA PRÓPRIA CONTA E RISCO.
gui.enable_client_side.enable=Habilitar
gui.viafabric_config.title=Configurações de ViaFabric
gui.client_side.enable=Habilitar modo cliente
gui.client_side.disable=Desativar modo cliente
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Esconder botão VIA
gui.hide_via_button.disable=Mostrar botão VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Версия протокола
gui.enable_client_side_button=Включить ViaFabric
gui.enable_client_side.question=Вы уверены, что хотите включить мод на стороне клиента?
gui.enable_client_side.warning=Я не могу гарантировать, что этот мод разрешен на любом сервере. Он может вызвать проблемы с анти-чит плагинами. ИСПОЛЬЗОВАТЬ НА СВОЙ СТРАХ И РИСК.
gui.enable_client_side.enable=Включить
gui.viafabric_config.title=Настройка ViaFabric
gui.client_side.enable=Включить на стороне клиент
gui.client_side.disable=Выключить на стороне клиента
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=Скрыть кнопку VIA
gui.hide_via_button.disable=Показать кнопку VIA
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=Protokol Versiyonu
gui.enable_client_side_button=ViaVersion'u aktive et
gui.enable_client_side.question=Alıcı-tarafı modunu aktive etmek istediğinize min misiniz?
gui.enable_client_side.warning=Bu modun her ( veya herhangi ) bir sunucuda izin verildiğine garanti veremem. Bu mod anti-cheat pluginleriyle sorunlara yol açabilir. KENDİ RİSKİNİZDE KULLANIN.
gui.enable_client_side.enable=Aktive et
gui.viafabric_config.title=ViaFabric Konfigürasyonu
gui.client_side.enable=Alıcı-tarafı aktive et
gui.client_side.disable=Alıcı-tarafı devre dışı bırak
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=VIA tuşunu gizle
gui.hide_via_button.disable=VIA tuşunu göster
gui.via_button=VIA

View File

@ -1,12 +0,0 @@
gui.protocol_version_field.name=协议版本
gui.enable_client_side_button=启用 ViaVersion
gui.enable_client_side.question=您确定要启用客户端模式?
gui.enable_client_side.warning=我无法保证所有(甚至任何一个)服务器允许您使用这个 mod。这个 mod 可能被反作弊插件作出误判。使用后果自负。
gui.enable_client_side.enable=启用
gui.viafabric_config.title=ViaFabric配置
gui.client_side.enable=启用客户端
gui.client_side.disable=禁用客户端
gui.ping_version.translated=VIA: %s
gui.hide_via_button.enable=隐藏VIA按钮
gui.hide_via_button.disable=显示VIA按钮
gui.via_button=VIA

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -13,5 +13,8 @@
"MixinMinecraft",
"MixinNetworkManager",
"MixinNetworkManagerChInit"
],
"client": [
"MixinGuiIngameMenu"
]
}