3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

Don't use Packet56 and clear client cache on world changes.

Dieser Commit ist enthalten in:
Travis Watkins 2012-08-05 18:42:03 -05:00
Ursprung 0e013fa4b0
Commit beb71069b7
2 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -167,7 +167,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
if (!arraylist.isEmpty()) {
this.netServerHandler.sendPacket(new Packet56MapChunkBulk(arraylist));
// CraftBukkit start - don't use map chunk bulk for now TODO: fix this
for (Object object : arraylist) {
this.netServerHandler.sendPacket(new Packet51MapChunk((Chunk) object, true, 0xffff));
}
// this.netServerHandler.sendPacket(new Packet56MapChunkBulk(arraylist));
// CraftBukkit end
Iterator iterator1 = arraylist1.iterator();
while (iterator1.hasNext()) {

Datei anzeigen

@ -380,6 +380,8 @@ public abstract class ServerConfigurationManagerAbstract {
// CraftBukkit start
byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
// Force the client to refresh their chunk cache.
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn((byte) (actualDimension >= 0 ? -1 : 0), (byte) worldserver.difficulty, worldserver.getWorldData().getType(), worldserver.getHeight(), entityplayer.itemInWorldManager.getGameMode()));
entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getWorldData().getType(), worldserver.getHeight(), entityplayer.itemInWorldManager.getGameMode()));
entityplayer1.spawnIn(worldserver);
entityplayer1.dead = false;