Did some more things

This commit is contained in:
PeytonPlayz595 2024-03-27 02:11:56 -04:00
parent c797cca9d9
commit a13ebd4ff3
6 changed files with 14220 additions and 14209 deletions

File diff suppressed because one or more lines are too long

View File

@ -143,8 +143,8 @@ public class GuiMultiplayer extends GuiScreen {
public void drawScreen(int var1, int var2, float var3) { public void drawScreen(int var1, int var2, float var3) {
this.drawDefaultBackground(); this.drawDefaultBackground();
this.drawCenteredString(this.fontRenderer, "Play Multiplayer", this.width / 2, this.height / 4 - 60 + 20, 16777215); this.drawCenteredString(this.fontRenderer, "Play Multiplayer", this.width / 2, this.height / 4 - 60 + 20, 16777215);
//this.drawString(this.fontRenderer, "Minecraft Multiplayer is currently not finished, but there", this.width / 2 - 140, this.height / 4 - 60 + 60 + 0, 10526880); this.drawString(this.fontRenderer, "Alpha Multiplayer is currently not finished, but there", this.width / 2 - 140, this.height / 4 - 80 + 60 + 0, 10526880);
//this.drawString(this.fontRenderer, "is some buggy early testing going on.", this.width / 2 - 140, this.height / 4 - 60 + 60 + 9, 10526880); this.drawString(this.fontRenderer, "is some buggy early testing going on.", this.width / 2 - 140, this.height / 4 - 80 + 60 + 9, 10526880);
this.drawString(this.fontRenderer, "Server IP:", this.width / 2 - 100, this.height / 4 - 50 + 60 + 36, 10526880); this.drawString(this.fontRenderer, "Server IP:", this.width / 2 - 100, this.height / 4 - 50 + 60 + 36, 10526880);
this.drawString(this.fontRenderer, "Username:", this.width / 2 - 100, this.height / 4 - 90 + 60 + 36, 10526880); this.drawString(this.fontRenderer, "Username:", this.width / 2 - 100, this.height / 4 - 90 + 60 + 36, 10526880);
int var4 = this.width / 2 - 100; int var4 = this.width / 2 - 100;

View File

@ -21,12 +21,7 @@ public class NetClientHandler extends NetHandler {
public void processReadPackets() { public void processReadPackets() {
if(!this.disconnected) { if(!this.disconnected) {
Thread thread = new Thread(new Runnable() { NetClientHandler.this.netManager.readPacket();
public void run() {
NetClientHandler.this.netManager.readPacket();
}
});
thread.start();
} }
} }

View File

@ -47,23 +47,18 @@ public class NetworkManager {
} }
public void addToSendQueue(Packet var1) { public void addToSendQueue(Packet var1) {
Thread thread = new Thread(new Runnable () { if(!this.isServerTerminating) {
public void run() { Object var2 = this.sendQueueLock;
if(!NetworkManager.this.isServerTerminating) { synchronized(var2) {
Object var2 = NetworkManager.this.sendQueueLock; this.sendQueueByteLength += var1.getPacketSize() + 1;
synchronized(var2) { if(var1.isChunkDataPacket) {
NetworkManager.this.sendQueueByteLength += var1.getPacketSize() + 1; this.chunkDataPackets.add(var1);
if(var1.isChunkDataPacket) { } else {
NetworkManager.this.chunkDataPackets.add(var1); this.dataPackets.add(var1);
} else {
NetworkManager.this.dataPackets.add(var1);
}
NetworkManager.this.sendPacket();
}
} }
this.sendPacket();
} }
}); }
thread.start();
} }
private ByteArrayOutputStream sendBuffer; private ByteArrayOutputStream sendBuffer;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long