public void Disconnect(string title, string reason) { Events.RaiseDisconnected(title, reason); Gui.Reset(this); World.Reset(); WorldEvents.RaiseOnNewMap(); IDrawer2D.InitCols(); BlockInfo.Reset(); TexturePack.ExtractDefault(this); Gui.SetNewScreen(new DisconnectScreen(this, title, reason)); GC.Collect(); }
public void Disconnect(string title, string reason) { World.Reset(); WorldEvents.RaiseOnNewMap(); Gui.SetNewScreen(new DisconnectScreen(this, title, reason)); IDrawer2D.InitCols(); BlockInfo.Reset(); TexturePack.ExtractDefault(this); for (int i = 0; i < Components.Count; i++) { Components[i].Reset(this); } GC.Collect(); }