Prevent session from being printed to the console, also make sure the username is not empty. Causes a lot of bugs further down the line.
This commit is contained in:
parent
465525119c
commit
412952be5b
2 changed files with 31 additions and 0 deletions
|
@ -17,6 +17,15 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class Minecraft implements IPlayerUsage
|
||||
{
|
||||
@@ -308,7 +318,7 @@
|
||||
this.startTimerHackThread();
|
||||
this.session = par1Session;
|
||||
this.mcLogAgent.logInfo("Setting user: " + par1Session.getUsername());
|
||||
- this.mcLogAgent.logInfo("(Session ID is " + par1Session.getSessionID() + ")");
|
||||
+ //this.mcLogAgent.logInfo("(Session ID is " + par1Session.getSessionID() + ")"); //don't print the session to the console.. that's stupid...
|
||||
this.isDemo = par5;
|
||||
this.displayWidth = par2;
|
||||
this.displayHeight = par3;
|
||||
@@ -416,7 +426,7 @@
|
||||
|
||||
try
|
||||
|
|
22
patches/minecraft/net/minecraft/util/Session.java.patch
Normal file
22
patches/minecraft/net/minecraft/util/Session.java.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- ../src_base/minecraft/net/minecraft/util/Session.java
|
||||
+++ ../src_work/minecraft/net/minecraft/util/Session.java
|
||||
@@ -11,6 +11,19 @@
|
||||
|
||||
public Session(String par1Str, String par2Str)
|
||||
{
|
||||
+ if (par1Str == null || par1Str.isEmpty())
|
||||
+ {
|
||||
+ par1Str = "MissingName";
|
||||
+ par2Str = "NotValid";
|
||||
+ System.out.println("=========================================================");
|
||||
+ System.out.println("Warning the username was not set for this session, typically");
|
||||
+ System.out.println("this means you installed Forge incorrectly. We have set your");
|
||||
+ System.out.println("name to \"MissingName\" and your session to nothing. Please");
|
||||
+ System.out.println("check your instation and post a console log from the launcher");
|
||||
+ System.out.println("when asking for help!");
|
||||
+ System.out.println("=========================================================");
|
||||
+
|
||||
+ }
|
||||
this.username = par1Str;
|
||||
this.sessionId = par2Str;
|
||||
}
|
Loading…
Reference in a new issue