Fix some multiplayer stuff

This commit is contained in:
PeytonPlayz595 2024-03-23 18:30:39 -04:00
parent 3f5d1cd6d1
commit e7cbfb0e89
9 changed files with 2144 additions and 2127 deletions

File diff suppressed because it is too large Load Diff

View File

@ -435,7 +435,7 @@ public class Minecraft implements Runnable {
public void shutdown() {
System.out.println("Stopping!");
if(this.theWorld != null) {
if(this.theWorld != null && !this.theWorld.multiplayerWorld) {
this.theWorld.saveLevel();
this.theWorld.chunkProvider.saveChunks(false, (IProgressUpdate)null);
}

View File

@ -300,6 +300,9 @@ public class ChunkProviderGenerate implements IChunkProvider {
}
public void populate(IChunkProvider var1, int var2, int var3) {
if(this.worldObj.multiplayerWorld) {
return;
}
BlockSand.fallInstantly = true;
int var4 = var2 * 16;
int var5 = var3 * 16;

View File

@ -45,6 +45,7 @@ public class GameSettings {
public GameSettings(Minecraft var1) {
this.mc = var1;
Minecraft.getMinecraft().gameSettings = this;
this.loadOptions();
}

View File

@ -141,8 +141,8 @@ public class NetworkManager {
stream.flip();
DataInputStream packetStream = new DataInputStream(new ByteBufferDirectInputStream(stream));
//int var1 = 100;
while(stream.hasRemaining()) {
int var1 = 100;
while(stream.hasRemaining() && var1-- >= 0) {
stream.mark();
try {
Packet pkt = Packet.readPacket(packetStream);
@ -205,9 +205,9 @@ public class NetworkManager {
return var0.isServerTerminating;
}
static void readNetworkPacket(NetworkManager var0) {
var0.readPacket();
}
// static void readNetworkPacket(NetworkManager var0) {
// var0.readPacket();
// }
static void sendNetworkPacket(NetworkManager var0) {
var0.sendPacket();

View File

@ -442,6 +442,10 @@ public class World implements IBlockAccess {
}
public boolean func_650_a(int var1) {
if(this.multiplayerWorld) {
return true;
}
if(!this.chunkProvider.func_536_b()) {
return true;
} else {
@ -2003,6 +2007,11 @@ public class World implements IBlockAccess {
}
public void func_663_l() {
if(this.multiplayerWorld) {
return;
}
if(!GL11.isWebGL) {
net.PeytonPlayz585.minecraft.World.checkSessionLock(this);
}

View File

@ -86,10 +86,12 @@ public class WorldClient extends World {
}
public void func_713_a(int var1, int var2, boolean var3) {
if(var3) {
this.C.func_538_d(var1, var2);
} else {
this.C.func_539_c(var1, var2);
if(this.C != null) {
if(var3) {
this.C.func_538_d(var1, var2);
} else {
this.C.func_539_c(var1, var2);
}
}
if(!var3) {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long