Minor fixes to the dev console

This commit is contained in:
Woah 2021-03-24 03:01:59 -04:00
parent 6b9b6cc70b
commit e3c66c7f3e
3 changed files with 12 additions and 11 deletions

View file

@ -73,10 +73,10 @@ final class KeyboardListener implements KeyListener, FocusListener {
DeveloperConsole.INSTANCE.toggle();
return;
}
// if (DeveloperConsole.INSTANCE.getOpen()) {
// DeveloperConsole.INSTANCE.handleKeyDown(var1);
// return;
// }
if (DeveloperConsole.INSTANCE.getOpen()) {
DeveloperConsole.INSTANCE.handleKeyDown(var1);
return;
}
if(null != Class3_Sub13_Sub3.aClass148_3049) {
Class3_Sub13_Sub33.anInt3398 = 0;

View file

@ -4111,7 +4111,6 @@ public class Unsorted {
if (var11.anInt189 == 1405) {
if (DeveloperConsole.INSTANCE.getOpen()) {
gameWindowWidth = var11.width + var13;
//Toolkit.getActiveToolkit().fillRect(0, 0, var11.width + var13, 300, 0x332277, 128);
}
if (ClientCommands.fpsOverlayEnabled) {

View file

@ -192,12 +192,13 @@ object DeveloperConsole {
Class3_Sub13_Sub1.outgoingBuffer.finishVarshortPacket(Class3_Sub13_Sub1.outgoingBuffer.index - index)
}
println(str)
val clientCommand: MutableList<String>
val args: Any
val command: String = str
clientCommand = command.split(' ') as MutableList<String>
val argSize = clientCommand.size
println(str)
when (clientCommand[0]) {
"enableconsolepackets" -> {
ENABLE_PACKETS = true
@ -340,7 +341,8 @@ object DeveloperConsole {
}
else -> {
System.out.println("Console command: $str")
sendCommand(str)
}
}
}
@ -406,10 +408,10 @@ object DeveloperConsole {
}
}
private fun sendCommand(command: String) {
@JvmStatic
fun sendCommand(command: String) {
Class3_Sub13_Sub1.outgoingBuffer.putOpcode(44)
Class3_Sub13_Sub1.outgoingBuffer.writeByte(command.length + -1)
// Class3_Sub13_Sub1.outgoingBuffer.writeString(command.substring(2))
Class3_Sub13_Sub1.outgoingBuffer.writeByte(command.length + 2)
Class3_Sub13_Sub1.outgoingBuffer.writeString(command)
}
}