Packets not sending - NOT a client issue
This commit is contained in:
parent
19a0d8e408
commit
fa6d2902d7
|
@ -118,6 +118,7 @@ public class WebSocketProxy extends SimpleChannelInboundHandler<ByteBuf> {
|
|||
|
||||
public void sendPacket(ByteBuffer arg1) {
|
||||
if(tcpChannel != null && tcpChannel.isOpen()) {
|
||||
System.out.println("[WebsocketProxy] - sending packet");
|
||||
tcpChannel.write(Unpooled.wrappedBuffer(arg1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ChannelWrapper {
|
|||
public synchronized void write(final Object packet) {
|
||||
if (!this.closed) {
|
||||
this.ch.write(packet);
|
||||
ch.unsafe().flushNow();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1072,6 +1072,7 @@ public class EaglerAdapterImpl2 {
|
|||
|
||||
@Override
|
||||
public void onMessage(String arg0) {
|
||||
System.out.println("onMessage (string) called");
|
||||
wasAbleToConnect = true;
|
||||
synchronized(socketSync) {
|
||||
if(arg0.equalsIgnoreCase("BLOCKED")) {
|
||||
|
@ -1099,6 +1100,9 @@ public class EaglerAdapterImpl2 {
|
|||
readPackets.add(arg0.array());
|
||||
}
|
||||
currentException = null;
|
||||
for(int i = 0; i < readPackets.size(); i++){
|
||||
System.out.println(readPackets.get(i).toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1140,7 +1144,7 @@ public class EaglerAdapterImpl2 {
|
|||
|
||||
public static final void writePacket(byte[] packet) {
|
||||
if(clientSocket != null && clientSocket.isOpen()) {
|
||||
System.out.println("[EaglerAdapterImpl2] - Writing packet");
|
||||
//System.out.println("[EaglerAdapterImpl2] - Writing packet");
|
||||
clientSocket.send(ByteBuffer.wrap(packet));
|
||||
}
|
||||
}
|
||||
|
@ -1149,9 +1153,6 @@ public class EaglerAdapterImpl2 {
|
|||
if(!readPackets.isEmpty()) {
|
||||
return readPackets.remove(0);
|
||||
}
|
||||
else {
|
||||
System.err.println("[EaglerAdapterImpl2] - Cannot read packet!");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -114,9 +114,6 @@ public class WebsocketNetworkManager implements INetworkManager {
|
|||
}
|
||||
|
||||
}
|
||||
else{
|
||||
System.err.println("[WebsocketNetworkManager] - readChunks is empty!");
|
||||
}
|
||||
}
|
||||
|
||||
public void serverShutdown() {
|
||||
|
|
|
@ -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.theIntegratedServer = null;
|
||||
}
|
||||
|
||||
this.renderViewEntity = null;
|
||||
this.myNetworkManager = null;
|
||||
|
||||
if (this.loadingScreen != null)
|
||||
{
|
||||
}
|
||||
System.out.println("worldClient not null");
|
||||
this.renderViewEntity = null;
|
||||
|
||||
if (this.loadingScreen != null) {
|
||||
this.loadingScreen.resetProgressAndMessage(par2Str);
|
||||
this.loadingScreen.resetProgresAndWorkingMessage("");
|
||||
}
|
||||
|
||||
if (par1WorldClient == null && this.theWorld != 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.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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue