mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 09:56:37 -04:00
more packets (1.9)
This commit is contained in:
parent
ada7f23ae5
commit
bb19b3a683
@ -16,7 +16,7 @@ package de.bixilon.minosoft.game.datatypes.blocks;
|
||||
import de.bixilon.minosoft.game.datatypes.Color;
|
||||
|
||||
public enum Blocks {
|
||||
UNKNOWN(-1), // the buggy pink black block
|
||||
UNKNOWN(-1), // the buggy pink black block (any other block)
|
||||
AIR(0),
|
||||
STONE(1),
|
||||
GRASS(2),
|
||||
|
@ -38,7 +38,7 @@ public class Connection {
|
||||
final ArrayList<ClientboundPacket> handlingQueue;
|
||||
PluginChannelHandler pluginChannelHandler;
|
||||
Thread handleThread;
|
||||
ProtocolVersion version = ProtocolVersion.VERSION_1_7_10; // default
|
||||
ProtocolVersion version = Protocol.getLowestVersionSupported(); // default
|
||||
Player player;
|
||||
ConnectionState state = ConnectionState.DISCONNECTED;
|
||||
ConnectionReason reason;
|
||||
@ -114,7 +114,7 @@ public class Connection {
|
||||
case DISCONNECTED:
|
||||
if (reason == ConnectionReason.GET_VERSION) {
|
||||
//ToDo: only for development, remove later
|
||||
//setVersion(ProtocolVersion.VERSION_1_9_4);
|
||||
setVersion(ProtocolVersion.VERSION_1_9_4);
|
||||
setReason(ConnectionReason.CONNECT);
|
||||
connect();
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import de.bixilon.minosoft.logging.Log;
|
||||
import de.bixilon.minosoft.protocol.packets.ClientboundPacket;
|
||||
import de.bixilon.minosoft.protocol.protocol.InPacketBuffer;
|
||||
import de.bixilon.minosoft.protocol.protocol.PacketHandler;
|
||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersion;
|
||||
import de.bixilon.minosoft.util.BitByte;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -72,8 +73,12 @@ public class PacketMapData implements ClientboundPacket {
|
||||
}
|
||||
return true;
|
||||
case VERSION_1_8:
|
||||
case VERSION_1_9_4: {
|
||||
mapId = buffer.readVarInt();
|
||||
scale = buffer.readByte();
|
||||
if (buffer.getVersion().getVersion() >= ProtocolVersion.VERSION_1_9_4.getVersion()) {
|
||||
boolean trackPosition = buffer.readBoolean();
|
||||
}
|
||||
int pinCount = buffer.readVarInt();
|
||||
pins = new ArrayList<>();
|
||||
for (int i = 0; i < pinCount; i++) {
|
||||
@ -92,6 +97,7 @@ public class PacketMapData implements ClientboundPacket {
|
||||
data = buffer.readBytes(dataLength);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -51,6 +51,7 @@ public class PacketParticle implements ClientboundPacket {
|
||||
count = buffer.readInteger();
|
||||
return true;
|
||||
case VERSION_1_8:
|
||||
case VERSION_1_9_4:
|
||||
particle = Particles.byType(buffer.readInteger());
|
||||
longDistance = buffer.readBoolean();
|
||||
x = buffer.readFloat();
|
||||
|
Loading…
x
Reference in New Issue
Block a user