mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Merge master into brigadier-dev
This commit is contained in:
commit
f2f88ac009
197 changed files with 102227 additions and 3487 deletions
|
|
@ -47,7 +47,7 @@ namespace MinecraftClient.Protocol.Handlers.Forge
|
|||
Version = fmlVersion;
|
||||
break;
|
||||
default:
|
||||
throw new InvalidOperationException(Translations.Get("error.forgeforce"));
|
||||
throw new InvalidOperationException(Translations.error_forgeforce);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
PacketTypePalette p;
|
||||
if (protocol > Protocol18Handler.MC_1_19_2_Version)
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.packet"));
|
||||
throw new NotImplementedException(Translations.exception_palette_packet);
|
||||
|
||||
if (protocol <= Protocol18Handler.MC_1_8_Version)
|
||||
p = new PacketPalette17();
|
||||
|
|
|
|||
|
|
@ -43,19 +43,19 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (Handler.GetTerrainEnabled())
|
||||
{
|
||||
Translations.WriteLineFormatted("extra.terrainandmovement_disabled");
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_terrainandmovement_disabled, acceptnewlines: true);
|
||||
Handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled())
|
||||
{
|
||||
Translations.WriteLineFormatted("extra.inventory_disabled");
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_inventory_disabled, acceptnewlines: true);
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetEntityHandlingEnabled())
|
||||
{
|
||||
Translations.WriteLineFormatted("extra.entity_disabled");
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_entity_disabled, acceptnewlines: true);
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
case 0x84: ReadData(11); nbr = ReadNextShort(); if (nbr > 0) { ReadData(nbr); } break;
|
||||
case 0x85: if (protocolversion >= 74) { ReadData(13); } break;
|
||||
case 0xC8:
|
||||
if (ReadNextInt() == 2022) { Translations.WriteLogLine("mcc.player_dead"); }
|
||||
if (ReadNextInt() == 2022) { ConsoleIO.WriteLogLine(Translations.mcc_player_dead, acceptnewlines: true); }
|
||||
if (protocolversion >= 72) { ReadData(4); } else ReadData(1);
|
||||
break;
|
||||
case 0xC9:
|
||||
|
|
@ -494,15 +494,15 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte[] token = ReadNextByteArray();
|
||||
|
||||
if (serverID == "-")
|
||||
Translations.WriteLineFormatted("mcc.server_offline");
|
||||
ConsoleIO.WriteLineFormatted(Translations.mcc_server_offline, acceptnewlines: true);
|
||||
else if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("mcc.handshake", serverID));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_handshake, serverID));
|
||||
|
||||
return StartEncryption(uuid, username, sessionID, token, serverID, PublicServerkey, session);
|
||||
}
|
||||
else
|
||||
{
|
||||
Translations.WriteLineFormatted("error.invalid_response");
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_invalid_response, acceptnewlines: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -513,11 +513,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte[] secretKey = CryptoHandler.ClientAESPrivateKey ?? CryptoHandler.GenerateAESPrivateKey();
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("debug.crypto");
|
||||
ConsoleIO.WriteLineFormatted(Translations.debug_crypto, acceptnewlines: true);
|
||||
|
||||
if (serverIDhash != "-")
|
||||
{
|
||||
Translations.WriteLine("mcc.session");
|
||||
ConsoleIO.WriteLine(Translations.mcc_session);
|
||||
string serverHash = CryptoHandler.GetServerHash(serverIDhash, serverPublicKey, secretKey);
|
||||
|
||||
bool needCheckSession = true;
|
||||
|
|
@ -539,7 +539,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.LoginRejected, Translations.Get("mcc.session_fail"));
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.LoginRejected, Translations.mcc_session_fail);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -578,7 +578,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
Translations.WriteLineFormatted("error.invalid_encrypt");
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_invalid_encrypt, acceptnewlines: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -891,7 +891,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
version = "B1.8.1 - 1.3.2";
|
||||
}
|
||||
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("mcc.use_version", version, protocolversion));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_use_version, version, protocolversion));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,24 +107,24 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_19_2_Version)
|
||||
{
|
||||
log.Error(Translations.Get("extra.terrainandmovement_disabled"));
|
||||
log.Error(Translations.extra_terrainandmovement_disabled);
|
||||
handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
{
|
||||
log.Error(Translations.Get("extra.inventory_disabled"));
|
||||
log.Error(Translations.extra_inventory_disabled);
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
{
|
||||
log.Error(Translations.Get("extra.entity_disabled"));
|
||||
log.Error(Translations.extra_entity_disabled);
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
}
|
||||
|
||||
// Block palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetTerrainEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.block"));
|
||||
throw new NotImplementedException(Translations.exception_palette_block);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
Block.Palette = new Palette119();
|
||||
|
|
@ -143,7 +143,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// Entity palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetEntityHandlingEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.entity"));
|
||||
throw new NotImplementedException(Translations.exception_palette_entity);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
entityPalette = new EntityPalette119();
|
||||
|
|
@ -164,7 +164,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// Item palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetInventoryEnabled())
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.item"));
|
||||
throw new NotImplementedException(Translations.exception_palette_item);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
itemPalette = new ItemPalette119();
|
||||
|
|
@ -587,7 +587,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
bool lastVerifyResult = player.IsMessageChainLegal();
|
||||
verifyResult = player.VerifyMessage(signedChat, timestamp, salt, ref headerSignature, ref precedingSignature, lastSeenMessages);
|
||||
if (lastVerifyResult && !verifyResult)
|
||||
log.Warn(Translations.Get("chat.message_chain_broken", senderDisplayName));
|
||||
log.Warn(string.Format(Translations.chat_message_chain_broken, senderDisplayName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -596,6 +596,33 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Acknowledge(chat);
|
||||
handler.OnTextReceived(chat);
|
||||
}
|
||||
break;
|
||||
case PacketTypesIn.CombatEvent:
|
||||
// 1.8 - 1.16.5
|
||||
if (protocolVersion >= MC_1_8_Version && protocolVersion <= MC_1_16_5_Version)
|
||||
{
|
||||
CombatEventType eventType = (CombatEventType)dataTypes.ReadNextVarInt(packetData);
|
||||
|
||||
if (eventType == CombatEventType.EntityDead)
|
||||
{
|
||||
dataTypes.SkipNextVarInt(packetData);
|
||||
|
||||
handler.OnPlayerKilled(
|
||||
dataTypes.ReadNextInt(packetData),
|
||||
ChatParser.ParseText(dataTypes.ReadNextString(packetData))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case PacketTypesIn.DeathCombatEvent:
|
||||
dataTypes.SkipNextVarInt(packetData);
|
||||
|
||||
handler.OnPlayerKilled(
|
||||
dataTypes.ReadNextInt(packetData),
|
||||
ChatParser.ParseText(dataTypes.ReadNextString(packetData))
|
||||
);
|
||||
|
||||
break;
|
||||
case PacketTypesIn.MessageHeader:
|
||||
if (protocolVersion >= MC_1_19_2_Version)
|
||||
|
|
@ -622,7 +649,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
bool lastVerifyResult = player.IsMessageChainLegal();
|
||||
verifyResult = player.VerifyMessageHead(ref precedingSignature, ref headerSignature, ref bodyDigest);
|
||||
if (lastVerifyResult && !verifyResult)
|
||||
log.Warn(Translations.Get("chat.message_chain_broken", player.Name));
|
||||
log.Warn(string.Format(Translations.chat_message_chain_broken, player.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1620,7 +1647,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
int healthField; // See https://wiki.vg/Entity_metadata#Living_Entity
|
||||
if (protocolVersion > MC_1_19_2_Version)
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.healthfield"));
|
||||
throw new NotImplementedException(Translations.exception_palette_healthfield);
|
||||
else if (protocolVersion >= MC_1_17_Version) // 1.17 and above
|
||||
healthField = 9;
|
||||
else if (protocolVersion >= MC_1_14_Version) // 1.14 and above
|
||||
|
|
@ -1628,7 +1655,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
else if (protocolVersion >= MC_1_10_Version) // 1.10 and above
|
||||
healthField = 7;
|
||||
else
|
||||
throw new NotImplementedException(Translations.Get("exception.palette.healthfield"));
|
||||
throw new NotImplementedException(Translations.exception_palette_healthfield);
|
||||
|
||||
if (metadata.TryGetValue(healthField, out object? healthObj) && healthObj != null && healthObj.GetType() == typeof(float))
|
||||
handler.OnEntityHealth(EntityID, (float)healthObj);
|
||||
|
|
@ -1761,7 +1788,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (innerException is ThreadAbortException || innerException is SocketException || innerException.InnerException is SocketException)
|
||||
throw; //Thread abort or Connection lost rather than invalid data
|
||||
throw new System.IO.InvalidDataException(
|
||||
Translations.Get("exception.packet_process",
|
||||
string.Format(Translations.exception_packet_process,
|
||||
packetPalette.GetIncommingTypeById(packetID),
|
||||
packetID,
|
||||
protocolVersion,
|
||||
|
|
@ -1926,12 +1953,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else if (packetID == 0x02) //Login successful
|
||||
{
|
||||
log.Info(Translations.Get("mcc.server_offline"));
|
||||
log.Info(Translations.mcc_server_offline);
|
||||
login_phase = false;
|
||||
|
||||
if (!pForge.CompleteForgeHandshake())
|
||||
{
|
||||
log.Error(Translations.Get("error.forge"));
|
||||
log.Error(Translations.error_forge);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1951,11 +1978,11 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
RSACryptoServiceProvider RSAService = CryptoHandler.DecodeRSAPublicKey(serverPublicKey)!;
|
||||
byte[] secretKey = CryptoHandler.ClientAESPrivateKey ?? CryptoHandler.GenerateAESPrivateKey();
|
||||
|
||||
log.Debug(Translations.Get("debug.crypto"));
|
||||
log.Debug(Translations.debug_crypto);
|
||||
|
||||
if (serverIDhash != "-")
|
||||
{
|
||||
log.Info(Translations.Get("mcc.session"));
|
||||
log.Info(Translations.mcc_session);
|
||||
|
||||
bool needCheckSession = true;
|
||||
if (session.ServerPublicKey != null && session.SessionPreCheckTask != null
|
||||
|
|
@ -1978,7 +2005,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.LoginRejected, Translations.Get("mcc.session_fail"));
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.LoginRejected, Translations.mcc_session_fail);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -2020,7 +2047,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
(int packetID, Queue<byte> packetData) = ReadNextPacket();
|
||||
if (packetID < 0 || loopPrevention-- < 0) // Failed to read packet or too many iterations (issue #1150)
|
||||
{
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, Translations.Get("error.invalid_encrypt"));
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, Translations.error_invalid_encrypt);
|
||||
return false;
|
||||
}
|
||||
else if (packetID == 0x00) //Login rejected
|
||||
|
|
@ -2056,7 +2083,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (!pForge.CompleteForgeHandshake())
|
||||
{
|
||||
log.Error(Translations.Get("error.forge_encrypt"));
|
||||
log.Error(Translations.error_forge_encrypt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2201,7 +2228,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// Check for forge on the server.
|
||||
Protocol18Forge.ServerInfoCheckForge(jsonData, ref forgeInfo);
|
||||
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("mcc.server_protocol", version, protocolVersion + (forgeInfo != null ? Translations.Get("mcc.with_forge") : "")));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_server_protocol, version, protocolVersion + (forgeInfo != null ? Translations.mcc_with_forge : "")));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte fmlProtocolVersion = dataTypes.ReadNextByte(packetData);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.version", fmlProtocolVersion));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_version, fmlProtocolVersion));
|
||||
|
||||
if (fmlProtocolVersion >= 1)
|
||||
currentDimension = dataTypes.ReadNextInt(packetData);
|
||||
|
|
@ -141,7 +141,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// Then tell the server that we're running the same mods.
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("forge.send_mod");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_send_mod, acceptnewlines: true);
|
||||
byte[][] mods = new byte[forgeInfo.Mods.Count][];
|
||||
for (int i = 0; i < forgeInfo.Mods.Count; i++)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Thread.Sleep(2000);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("forge.accept");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_accept, acceptnewlines: true);
|
||||
// Tell the server that yes, we are OK with the mods it has
|
||||
// even though we don't actually care what mods it has.
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
int registrySize = dataTypes.ReadNextVarInt(packetData);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.registry", registrySize));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_registry, registrySize));
|
||||
|
||||
fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
string registryName = dataTypes.ReadNextString(packetData);
|
||||
int registrySize = dataTypes.ReadNextVarInt(packetData);
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.registry_2", registryName, registrySize));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_registry_2, registryName, registrySize));
|
||||
if (!hasNextRegistry)
|
||||
fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (discriminator != FMLHandshakeDiscriminator.HandshakeAck)
|
||||
return false;
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("forge.accept_registry");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_accept_registry, acceptnewlines: true);
|
||||
SendForgeHandshakePacket(FMLHandshakeDiscriminator.HandshakeAck,
|
||||
new byte[] { (byte)FMLHandshakeClientState.PENDINGCOMPLETE });
|
||||
fmlHandshakeState = FMLHandshakeClientState.COMPLETE;
|
||||
|
|
@ -221,7 +221,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
SendForgeHandshakePacket(FMLHandshakeDiscriminator.HandshakeAck,
|
||||
new byte[] { (byte)FMLHandshakeClientState.COMPLETE });
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLine("forge.complete");
|
||||
ConsoleIO.WriteLine(Translations.forge_complete);
|
||||
fmlHandshakeState = FMLHandshakeClientState.DONE;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -301,7 +301,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// [1]: Version is usually set to "FML2" for FML stuff and "1" for mods
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("forge.fml2.mod");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_fml2_mod, acceptnewlines: true);
|
||||
|
||||
List<string> mods = new();
|
||||
int modCount = dataTypes.ReadNextVarInt(packetData);
|
||||
|
|
@ -333,7 +333,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// In MCC, we just want to send a valid response so we'll reply back with data collected from the server.
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
Translations.WriteLineFormatted("forge.fml2.mod_send");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_fml2_mod_send, acceptnewlines: true);
|
||||
|
||||
// Packet ID 2: Client to Server Mod List
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(2));
|
||||
|
|
@ -371,7 +371,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
string registryName = dataTypes.ReadNextString(packetData);
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.fml2.registry", registryName));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_registry, registryName));
|
||||
}
|
||||
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(99));
|
||||
|
|
@ -390,7 +390,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
string configName = dataTypes.ReadNextString(packetData);
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.fml2.config", configName));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_config, configName));
|
||||
}
|
||||
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(99));
|
||||
|
|
@ -399,7 +399,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
default:
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.fml2.unknown", packetID));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_unknown, packetID));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.fml2.unknown_channel", fmlChannel));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_unknown_channel, fmlChannel));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -464,7 +464,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
return new ForgeInfo(FMLVersion.FML2);
|
||||
}
|
||||
else throw new InvalidOperationException(Translations.Get("error.forgeforce"));
|
||||
else throw new InvalidOperationException(Translations.error_forgeforce);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -504,10 +504,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
forgeInfo = new ForgeInfo(modData, fmlVersion);
|
||||
if (forgeInfo.Mods.Any())
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.Get("forge.with_mod", forgeInfo.Mods.Count));
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_with_mod, forgeInfo.Mods.Count));
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
Translations.WriteLineFormatted("forge.mod_list");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_mod_list, acceptnewlines: true);
|
||||
foreach (ForgeInfo.ForgeMod mod in forgeInfo.Mods)
|
||||
ConsoleIO.WriteLineFormatted("§8 " + mod.ToString());
|
||||
}
|
||||
|
|
@ -515,7 +515,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
Translations.WriteLineFormatted("forge.no_mod");
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_no_mod, acceptnewlines: true);
|
||||
forgeInfo = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue