22w13e Test fix to 'End of Stream', fixed ENTER on macOs, fixed stuck CTRL in copy
This commit is contained in:
parent
436315c15e
commit
4f72bb5fd4
91877
javascript/classes.js
91877
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@ public class ConfigConstants {
|
||||||
|
|
||||||
public static boolean profanity = false;
|
public static boolean profanity = false;
|
||||||
|
|
||||||
public static final String version = "22w13d";
|
public static final String version = "22w13e";
|
||||||
public static final String mainMenuString = "eaglercraft " + version;
|
public static final String mainMenuString = "eaglercraft " + version;
|
||||||
|
|
||||||
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
public static final String forkMe = "https://github.com/LAX1DUDE/eaglercraft";
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.nio.ByteBuffer;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import net.minecraft.src.INetworkManager;
|
import net.minecraft.src.INetworkManager;
|
||||||
|
import net.minecraft.src.NetClientHandler;
|
||||||
import net.minecraft.src.NetHandler;
|
import net.minecraft.src.NetHandler;
|
||||||
import net.minecraft.src.Packet;
|
import net.minecraft.src.Packet;
|
||||||
|
|
||||||
|
@ -79,6 +80,9 @@ public class WebsocketNetworkManager implements INetworkManager {
|
||||||
readChunks.add(ByteBuffer.wrap(packet));
|
readChunks.add(ByteBuffer.wrap(packet));
|
||||||
}
|
}
|
||||||
if(!readChunks.isEmpty()) {
|
if(!readChunks.isEmpty()) {
|
||||||
|
if(this.netHandler instanceof NetClientHandler) {
|
||||||
|
((NetClientHandler)this.netHandler).lastKeepAlive = ((NetClientHandler)this.netHandler).updateCounter;
|
||||||
|
}
|
||||||
|
|
||||||
int cap = 0;
|
int cap = 0;
|
||||||
for(ByteBuffer b : readChunks) {
|
for(ByteBuffer b : readChunks) {
|
||||||
|
|
|
@ -189,9 +189,9 @@ public class GuiScreen extends Gui {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMacOs && var1 == 28 && var2 == 0) {
|
//if (isMacOs && var1 == 28 && var2 == 0) {
|
||||||
var1 = 29;
|
// var1 = 29;
|
||||||
}
|
//}
|
||||||
|
|
||||||
this.keyTyped(var2, var1);
|
this.keyTyped(var2, var1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class NetClientHandler extends NetHandler {
|
||||||
public List playerInfoList = new ArrayList();
|
public List playerInfoList = new ArrayList();
|
||||||
public int currentServerMaxPlayers = 20;
|
public int currentServerMaxPlayers = 20;
|
||||||
private GuiScreen field_98183_l = null;
|
private GuiScreen field_98183_l = null;
|
||||||
private int updateCounter = 0;
|
public int updateCounter = 0;
|
||||||
private int lastKeepAlive = 0;
|
public int lastKeepAlive = 0;
|
||||||
private int focusTimer = 0;
|
private int focusTimer = 0;
|
||||||
|
|
||||||
/** RNG. */
|
/** RNG. */
|
||||||
|
@ -83,9 +83,14 @@ public class NetClientHandler extends NetHandler {
|
||||||
*/
|
*/
|
||||||
public void processReadPackets() {
|
public void processReadPackets() {
|
||||||
++this.updateCounter;
|
++this.updateCounter;
|
||||||
|
|
||||||
|
if (!this.disconnected && this.netManager != null) {
|
||||||
|
this.netManager.processReadPackets();
|
||||||
|
}
|
||||||
|
|
||||||
if(EaglerAdapter.isFocused()) {
|
if(EaglerAdapter.isFocused()) {
|
||||||
--focusTimer;
|
--focusTimer;
|
||||||
if((focusTimer < 0 && updateCounter - lastKeepAlive > 200) || !EaglerAdapter.connectionOpen()) {
|
if((focusTimer < 0 && updateCounter - lastKeepAlive > 400) || !EaglerAdapter.connectionOpen()) {
|
||||||
this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect." + (EaglerAdapter.connectionOpen() ? "endOfStream" :" timeout"), null));
|
this.mc.displayGuiScreen(new GuiDisconnected(new GuiMultiplayer(new GuiMainMenu()), "disconnect.disconnected", "disconnect." + (EaglerAdapter.connectionOpen() ? "endOfStream" :" timeout"), null));
|
||||||
this.netManager.closeConnections();
|
this.netManager.closeConnections();
|
||||||
this.disconnected = true;
|
this.disconnected = true;
|
||||||
|
@ -93,14 +98,7 @@ public class NetClientHandler extends NetHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
focusTimer = 60;
|
focusTimer = 100;
|
||||||
}
|
|
||||||
if (!this.disconnected && this.netManager != null) {
|
|
||||||
this.netManager.processReadPackets();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.netManager != null) {
|
|
||||||
this.netManager.wakeThreads();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1612,9 +1612,13 @@ public class EaglerAdapterImpl2 {
|
||||||
public static native String getClipboard();
|
public static native String getClipboard();
|
||||||
|
|
||||||
private static void getClipboard(final AsyncCallback<String> cb) {
|
private static void getClipboard(final AsyncCallback<String> cb) {
|
||||||
|
final long start = System.currentTimeMillis();
|
||||||
getClipboard0(new StupidFunctionResolveString() {
|
getClipboard0(new StupidFunctionResolveString() {
|
||||||
@Override
|
@Override
|
||||||
public void resolveStr(String s) {
|
public void resolveStr(String s) {
|
||||||
|
if(System.currentTimeMillis() - start > 500l) {
|
||||||
|
keyStates[28] = false; //un-press ctrl
|
||||||
|
}
|
||||||
cb.complete(s);
|
cb.complete(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user