Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e0833ca6b | ||
|
|
88086e00d0 | ||
|
|
9368347b56 |
No files matched your search
@@ -1,4 +1,4 @@
|
||||
# ViaVersion 0.3.5
|
||||
# ViaVersion 0.3.7
|
||||
**Allows the connection of 1.8 clients to 1.9**
|
||||
|
||||
This plugin modifies netty to allow connection of 1.9 clients to 1.8,
|
||||
|
||||
@@ -39,7 +39,7 @@ public class NetUtil {
|
||||
|
||||
public static Column readOldChunkData(int x, int z, boolean isFullChunk, int bitmask, byte[] input, boolean checkForSky, boolean hasSkyLight) {
|
||||
int pos = 0;
|
||||
int expected = 0;
|
||||
int expected = isFullChunk ? 256 : 0;
|
||||
boolean sky = false;
|
||||
ShortBuffer buf = ByteBuffer.wrap(input).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer();
|
||||
// 0 = Calculate expected length and determine if the packet has skylight.
|
||||
@@ -85,7 +85,7 @@ public class NetUtil {
|
||||
}
|
||||
|
||||
if(pass == 3) {
|
||||
if(chunks[ind].getSkyLight() != null) {
|
||||
if(sky) {
|
||||
NibbleArray3d skylight = chunks[ind].getSkyLight();
|
||||
System.arraycopy(input, pos, skylight.getData(), 0, skylight.getData().length);
|
||||
pos += skylight.getData().length;
|
||||
|
||||
@@ -20,7 +20,7 @@ public enum PacketType {
|
||||
/* Play serverbound */
|
||||
PLAY_TP_CONFIRM(State.PLAY, Direction.INCOMING, -1, 0x00),
|
||||
PLAY_TAB_COMPLETE_REQUEST(State.PLAY, Direction.INCOMING, 0x14, 0x01),
|
||||
PLAY_CLICHAT_MESSAGE_CLIENT(State.PLAY, Direction.INCOMING, 0x01, 0x02),
|
||||
PLAY_CHAT_MESSAGE_CLIENT(State.PLAY, Direction.INCOMING, 0x01, 0x02),
|
||||
PLAY_CLIENT_STATUS(State.PLAY, Direction.INCOMING, 0x16, 0x03),
|
||||
PLAY_CLIENT_SETTINGS(State.PLAY, Direction.INCOMING, 0x15, 0x04),
|
||||
PLAY_CONFIRM_TRANS(State.PLAY, Direction.INCOMING, 0x0F, 0x05),
|
||||
|
||||
@@ -222,6 +222,7 @@ public class OutgoingTransformer {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (packet == PacketType.PLAY_SPAWN_GLOBAL_ENTITY) {
|
||||
int id = PacketUtil.readVarInt(input);
|
||||
PacketUtil.writeVarInt(id, output);
|
||||
@@ -376,6 +377,14 @@ public class OutgoingTransformer {
|
||||
PacketUtil.writeString(fixJson(line), output);
|
||||
}
|
||||
}
|
||||
if(packet == PacketType.PLAY_CHAT_MESSAGE) {
|
||||
String chat = PacketUtil.readString(input);
|
||||
PacketUtil.writeString(fixJson(chat), output);
|
||||
|
||||
byte pos = input.readByte();
|
||||
output.writeByte(pos);
|
||||
return;
|
||||
}
|
||||
if (packet == PacketType.PLAY_JOIN_GAME) {
|
||||
int id = input.readInt();
|
||||
clientEntityTypes.put(id, EntityType.PLAYER);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: ViaVersion
|
||||
main: us.myles.ViaVersion.ViaVersionPlugin
|
||||
author: _MylesC
|
||||
version: 0.3.5
|
||||
version: 0.3.7
|
||||
Reference in new issue
Block a user