mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 12:51:09 -05:00
20w46a
This commit is contained in:
parent
ea3d99d0f9
commit
5993241c70
3 changed files with 28 additions and 23 deletions
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
|||
|
||||
<groupId>com.github.steveice10</groupId>
|
||||
<artifactId>mcprotocollib</artifactId>
|
||||
<version>20w45a-SNAPSHOT</version>
|
||||
<version>20w46a-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>MCProtocolLib</name>
|
||||
|
|
|
@ -12,12 +12,12 @@ public final class MinecraftConstants {
|
|||
/**
|
||||
* Current supported game version.
|
||||
*/
|
||||
public static final String GAME_VERSION = "20w45a";
|
||||
public static final String GAME_VERSION = "20w46a";
|
||||
|
||||
/**
|
||||
* Current supported protocol version.
|
||||
*/
|
||||
public static final int PROTOCOL_VERSION = (1 << 30) | 5;
|
||||
public static final int PROTOCOL_VERSION = (1 << 30) | 6;
|
||||
|
||||
// General Key Constants
|
||||
|
||||
|
|
|
@ -55,15 +55,18 @@ public class ServerMapDataPacket implements Packet {
|
|||
this.icons[index] = new MapIcon(x, z, MagicValues.key(MapIconType.class, type), rotation, displayName);
|
||||
}
|
||||
|
||||
int columns = in.readUnsignedByte();
|
||||
if(columns > 0) {
|
||||
int rows = in.readUnsignedByte();
|
||||
int x = in.readUnsignedByte();
|
||||
int y = in.readUnsignedByte();
|
||||
byte[] data = in.readBytes(in.readVarInt());
|
||||
if(trackingPosition) {
|
||||
int columns = in.readUnsignedByte();
|
||||
if(columns > 0) {
|
||||
int rows = in.readUnsignedByte();
|
||||
int x = in.readUnsignedByte();
|
||||
int y = in.readUnsignedByte();
|
||||
byte[] data = in.readBytes(in.readVarInt());
|
||||
|
||||
this.data = new MapData(columns, rows, x, y, data);
|
||||
this.data = new MapData(columns, rows, x, y, data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,19 +75,21 @@ public class ServerMapDataPacket implements Packet {
|
|||
out.writeByte(this.scale);
|
||||
out.writeBoolean(this.trackingPosition);
|
||||
out.writeBoolean(this.locked);
|
||||
out.writeVarInt(this.icons.length);
|
||||
for(int index = 0; index < this.icons.length; index++) {
|
||||
MapIcon icon = this.icons[index];
|
||||
int type = MagicValues.value(Integer.class, icon.getIconType());
|
||||
out.writeVarInt(type);
|
||||
out.writeByte(icon.getCenterX());
|
||||
out.writeByte(icon.getCenterZ());
|
||||
out.writeByte(icon.getIconRotation());
|
||||
if (icon.getDisplayName() != null) {
|
||||
out.writeBoolean(false);
|
||||
out.writeString(MessageSerializer.toJsonString(icon.getDisplayName()));
|
||||
} else {
|
||||
out.writeBoolean(true);
|
||||
if(this.trackingPosition) {
|
||||
out.writeVarInt(this.icons.length);
|
||||
for(int index = 0; index < this.icons.length; index++) {
|
||||
MapIcon icon = this.icons[index];
|
||||
int type = MagicValues.value(Integer.class, icon.getIconType());
|
||||
out.writeVarInt(type);
|
||||
out.writeByte(icon.getCenterX());
|
||||
out.writeByte(icon.getCenterZ());
|
||||
out.writeByte(icon.getIconRotation());
|
||||
if (icon.getDisplayName() != null) {
|
||||
out.writeBoolean(false);
|
||||
out.writeString(MessageSerializer.toJsonString(icon.getDisplayName()));
|
||||
} else {
|
||||
out.writeBoolean(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue