Packets not sending - NOT a client issue

This commit is contained in:
catfoolyou
2025-02-26 13:48:52 -05:00
parent 19a0d8e408
commit fa6d2902d7
7 changed files with 50 additions and 43 deletions

View File

@@ -114,9 +114,6 @@ public class WebsocketNetworkManager implements INetworkManager {
}
}
else{
System.err.println("[WebsocketNetworkManager] - readChunks is empty!");
}
}
public void serverShutdown() {

View File

@@ -1608,78 +1608,86 @@ public class Minecraft
/**
* par2Str is displayed on the loading screen to the user unloads the current world first
*/
public void loadWorld(WorldClient par1WorldClient, String par2Str) // FIX THIS SHIT
{
//this.statFileWriter.syncStats();
if (par1WorldClient == null)
{
public void loadWorld(WorldClient par1WorldClient, String par2Str) {
if (par1WorldClient == null) {
System.out.println("worldClient is null");
NetClientHandler var3 = this.getNetHandler();
if (var3 != null)
{
if (var3 != null) {
var3.cleanup();
}
if (this.myNetworkManager != null)
{
if (this.myNetworkManager != null) {
this.myNetworkManager.closeConnections();
}
if (this.theIntegratedServer != null)
{
//this.theIntegratedServer.initiateShutdown();
}
this.myNetworkManager = null;
this.theIntegratedServer = null;
}
System.out.println("worldClient not null");
this.renderViewEntity = null;
this.myNetworkManager = null;
if (this.loadingScreen != null)
{
if (this.loadingScreen != null) {
this.loadingScreen.resetProgressAndMessage(par2Str);
this.loadingScreen.resetProgresAndWorkingMessage("");
}
if (par1WorldClient == null && this.theWorld != null)
{
this.setServerData((ServerData)null);
if (par1WorldClient == null && this.theWorld != null) {
if (this.texturePackList.getIsDownloading()) {
this.texturePackList.onDownloadFinished();
}
this.lanState = false;
IntegratedServer.unloadWorld();
this.setServerData((ServerData) null);
this.integratedServerIsRunning = false;
}
this.sndManager.playStreaming((String)null, 0.0F, 0.0F, 0.0F);
this.sndManager.playStreaming((String) null, 0.0F, 0.0F, 0.0F);
this.sndManager.stopAllSounds();
if(EaglerAdapter.isVideoSupported()) {
EaglerAdapter.unloadVideo();
}
this.theWorld = par1WorldClient;
if (par1WorldClient != null)
{
if (this.renderGlobal != null)
{
if (par1WorldClient != null) {
System.out.println("doing rendering shit");
if (this.renderGlobal != null) {
this.renderGlobal.setWorldAndLoadRenderers(par1WorldClient);
}
if (this.effectRenderer != null)
{
if (this.effectRenderer != null) {
this.effectRenderer.clearEffects(par1WorldClient);
}
if (this.thePlayer == null)
{
if (this.thePlayer == null) {
this.thePlayer = this.playerController.func_78754_a(par1WorldClient);
this.playerController.flipPlayer(this.thePlayer);
}
//if(!EaglerAdapter._wisAnisotropicPatched()) {
// displayEaglercraftText("ANGLE Issue #4994 is unpatched on this browser, using fake aliased sampling on linear magnified terrain texture for anisotropic filtering. Chrome patch progress and information available at https://crbug.com/angleproject/4994");
//}
StringTranslate var4 = StringTranslate.getInstance();
if(!this.gameSettings.fancyGraphics || this.gameSettings.ambientOcclusion == 0) {
displayEaglercraftText("Note: " + var4.translateKey("fancyGraphicsNote"));
}
if(this.gameSettings.showCoordinates) {
displayEaglercraftText(EnumChatFormatting.LIGHT_PURPLE + "Note: use F+6 to hide the coordinates off of the screen (if you're in public)");
}else {
displayEaglercraftText(EnumChatFormatting.LIGHT_PURPLE + "Note: use F+6 to show your coordinates on the screen");
}
messageOnLoginCounter = 0;
this.thePlayer.preparePlayerToSpawn();
par1WorldClient.spawnEntityInWorld(this.thePlayer);
this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
this.playerController.setPlayerCapabilities(this.thePlayer);
this.renderViewEntity = this.thePlayer;
}
else
{
//this.saveLoader.flushCache();
} else {
this.thePlayer = null;
}

View File

@@ -91,7 +91,6 @@ public class NetClientHandler extends NetHandler {
*/
public void processReadPackets() {
if (this.netManager != null) {
System.out.println("[NetClientHandler] - processReadPackets called");
this.netManager.processReadPackets();
}