Files
MinecraftForge/patches/minecraft/net/minecraft/util/Session.java.patch
T

32 lines
1.5 KiB
Diff

--- ../src-base/minecraft/net/minecraft/util/Session.java
+++ ../src-work/minecraft/net/minecraft/util/Session.java
@@ -19,6 +19,19 @@
public Session(String p_i1098_1_, String p_i1098_2_, String p_i1098_3_, String p_i1098_4_)
{
+ if (p_i1098_1_ == null || p_i1098_1_.isEmpty())
+ {
+ p_i1098_1_ = "MissingName";
+ p_i1098_2_ = p_i1098_3_ = "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 instllation and post a console log from the launcher");
+ System.out.println("when asking for help!");
+ System.out.println("=========================================================");
+
+ }
this.field_74286_b = p_i1098_1_;
this.field_148257_b = p_i1098_2_;
this.field_148258_c = p_i1098_3_;
@@ -54,7 +67,7 @@
}
catch (IllegalArgumentException illegalargumentexception)
{
- return new GameProfile((UUID)null, this.func_111285_a());
+ return new GameProfile(net.minecraft.entity.player.EntityPlayer.func_146094_a(new GameProfile((UUID)null, this.func_111285_a())), this.func_111285_a());
}
}