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) {
|
public void sendPacket(ByteBuffer arg1) {
|
||||||
if(tcpChannel != null && tcpChannel.isOpen()) {
|
if(tcpChannel != null && tcpChannel.isOpen()) {
|
||||||
|
System.out.println("[WebsocketProxy] - sending packet");
|
||||||
tcpChannel.write(Unpooled.wrappedBuffer(arg1));
|
tcpChannel.write(Unpooled.wrappedBuffer(arg1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class ChannelWrapper {
|
||||||
public synchronized void write(final Object packet) {
|
public synchronized void write(final Object packet) {
|
||||||
if (!this.closed) {
|
if (!this.closed) {
|
||||||
this.ch.write(packet);
|
this.ch.write(packet);
|
||||||
|
ch.unsafe().flushNow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1072,6 +1072,7 @@ public class EaglerAdapterImpl2 {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(String arg0) {
|
public void onMessage(String arg0) {
|
||||||
|
System.out.println("onMessage (string) called");
|
||||||
wasAbleToConnect = true;
|
wasAbleToConnect = true;
|
||||||
synchronized(socketSync) {
|
synchronized(socketSync) {
|
||||||
if(arg0.equalsIgnoreCase("BLOCKED")) {
|
if(arg0.equalsIgnoreCase("BLOCKED")) {
|
||||||
|
@ -1099,6 +1100,9 @@ public class EaglerAdapterImpl2 {
|
||||||
readPackets.add(arg0.array());
|
readPackets.add(arg0.array());
|
||||||
}
|
}
|
||||||
currentException = null;
|
currentException = null;
|
||||||
|
for(int i = 0; i < readPackets.size(); i++){
|
||||||
|
System.out.println(readPackets.get(i).toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1140,7 +1144,7 @@ public class EaglerAdapterImpl2 {
|
||||||
|
|
||||||
public static final void writePacket(byte[] packet) {
|
public static final void writePacket(byte[] packet) {
|
||||||
if(clientSocket != null && clientSocket.isOpen()) {
|
if(clientSocket != null && clientSocket.isOpen()) {
|
||||||
System.out.println("[EaglerAdapterImpl2] - Writing packet");
|
//System.out.println("[EaglerAdapterImpl2] - Writing packet");
|
||||||
clientSocket.send(ByteBuffer.wrap(packet));
|
clientSocket.send(ByteBuffer.wrap(packet));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1149,9 +1153,6 @@ public class EaglerAdapterImpl2 {
|
||||||
if(!readPackets.isEmpty()) {
|
if(!readPackets.isEmpty()) {
|
||||||
return readPackets.remove(0);
|
return readPackets.remove(0);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
System.err.println("[EaglerAdapterImpl2] - Cannot read packet!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,9 +114,6 @@ public class WebsocketNetworkManager implements INetworkManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
System.err.println("[WebsocketNetworkManager] - readChunks is empty!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void serverShutdown() {
|
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
|
* 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
|
public void loadWorld(WorldClient par1WorldClient, String par2Str) {
|
||||||
{
|
if (par1WorldClient == null) {
|
||||||
//this.statFileWriter.syncStats();
|
System.out.println("worldClient is null");
|
||||||
|
|
||||||
if (par1WorldClient == null)
|
|
||||||
{
|
|
||||||
NetClientHandler var3 = this.getNetHandler();
|
NetClientHandler var3 = this.getNetHandler();
|
||||||
|
|
||||||
if (var3 != null)
|
if (var3 != null) {
|
||||||
{
|
|
||||||
var3.cleanup();
|
var3.cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.myNetworkManager != null)
|
if (this.myNetworkManager != null) {
|
||||||
{
|
|
||||||
this.myNetworkManager.closeConnections();
|
this.myNetworkManager.closeConnections();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.theIntegratedServer != null)
|
|
||||||
{
|
|
||||||
//this.theIntegratedServer.initiateShutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.theIntegratedServer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.renderViewEntity = null;
|
|
||||||
this.myNetworkManager = 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.resetProgressAndMessage(par2Str);
|
||||||
this.loadingScreen.resetProgresAndWorkingMessage("");
|
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.setServerData((ServerData) null);
|
||||||
this.integratedServerIsRunning = false;
|
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();
|
this.sndManager.stopAllSounds();
|
||||||
|
if(EaglerAdapter.isVideoSupported()) {
|
||||||
|
EaglerAdapter.unloadVideo();
|
||||||
|
}
|
||||||
this.theWorld = par1WorldClient;
|
this.theWorld = par1WorldClient;
|
||||||
|
|
||||||
if (par1WorldClient != null)
|
if (par1WorldClient != null) {
|
||||||
{
|
System.out.println("doing rendering shit");
|
||||||
if (this.renderGlobal != null)
|
if (this.renderGlobal != null) {
|
||||||
{
|
|
||||||
this.renderGlobal.setWorldAndLoadRenderers(par1WorldClient);
|
this.renderGlobal.setWorldAndLoadRenderers(par1WorldClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.effectRenderer != null)
|
if (this.effectRenderer != null) {
|
||||||
{
|
|
||||||
this.effectRenderer.clearEffects(par1WorldClient);
|
this.effectRenderer.clearEffects(par1WorldClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.thePlayer == null)
|
if (this.thePlayer == null) {
|
||||||
{
|
|
||||||
this.thePlayer = this.playerController.func_78754_a(par1WorldClient);
|
this.thePlayer = this.playerController.func_78754_a(par1WorldClient);
|
||||||
this.playerController.flipPlayer(this.thePlayer);
|
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();
|
this.thePlayer.preparePlayerToSpawn();
|
||||||
par1WorldClient.spawnEntityInWorld(this.thePlayer);
|
par1WorldClient.spawnEntityInWorld(this.thePlayer);
|
||||||
this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
|
this.thePlayer.movementInput = new MovementInputFromOptions(this.gameSettings);
|
||||||
this.playerController.setPlayerCapabilities(this.thePlayer);
|
this.playerController.setPlayerCapabilities(this.thePlayer);
|
||||||
this.renderViewEntity = this.thePlayer;
|
this.renderViewEntity = this.thePlayer;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//this.saveLoader.flushCache();
|
|
||||||
this.thePlayer = null;
|
this.thePlayer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@ public class NetClientHandler extends NetHandler {
|
||||||
*/
|
*/
|
||||||
public void processReadPackets() {
|
public void processReadPackets() {
|
||||||
if (this.netManager != null) {
|
if (this.netManager != null) {
|
||||||
System.out.println("[NetClientHandler] - processReadPackets called");
|
|
||||||
this.netManager.processReadPackets();
|
this.netManager.processReadPackets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue