Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Eventually we should have some sort of handler for this, but this is fine for now
Dieser Commit ist enthalten in:
Ursprung
8a35c0235e
Commit
625a1d2191
@ -4,6 +4,8 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.MessageToMessageEncoder;
|
import io.netty.handler.codec.MessageToMessageEncoder;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
|
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.ClientChunks;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.ClientChunks;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -24,8 +26,10 @@ public class ViaChunkHandler extends MessageToMessageEncoder {
|
|||||||
info.setLastPacket(o);
|
info.setLastPacket(o);
|
||||||
/* This transformer is more for fixing issues which we find hard at packet level :) */
|
/* This transformer is more for fixing issues which we find hard at packet level :) */
|
||||||
if (o.getClass().getName().endsWith("PacketPlayOutMapChunkBulk") && info.isActive()) {
|
if (o.getClass().getName().endsWith("PacketPlayOutMapChunkBulk") && info.isActive()) {
|
||||||
list.addAll(info.get(ClientChunks.class).transformMapChunkBulk(o));
|
if (info.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9TO1_8.class)) {
|
||||||
return;
|
list.addAll(info.get(ClientChunks.class).transformMapChunkBulk(o));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren