mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 01:16:46 -04:00
add support 21w17a
This commit is contained in:
parent
134ec6207c
commit
2497b9500b
@ -22,20 +22,25 @@ import de.bixilon.minosoft.util.logging.Log;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_14W04A;
|
||||
import static de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_21W17A;
|
||||
|
||||
public class PacketDestroyEntity extends PlayS2CPacket {
|
||||
private final int[] entityIds;
|
||||
|
||||
public PacketDestroyEntity(PlayInByteBuffer buffer) {
|
||||
if (buffer.getVersionId() < V_14W04A) {
|
||||
this.entityIds = new int[buffer.readByte()];
|
||||
} else {
|
||||
this.entityIds = new int[buffer.readVarInt()];
|
||||
}
|
||||
if (buffer.getVersionId() < V_21W17A) {
|
||||
if (buffer.getVersionId() < V_14W04A) {
|
||||
this.entityIds = new int[buffer.readByte()];
|
||||
} else {
|
||||
this.entityIds = new int[buffer.readVarInt()];
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.entityIds.length; i++) {
|
||||
this.entityIds[i] = buffer.readEntityId();
|
||||
for (int i = 0; i < this.entityIds.length; i++) {
|
||||
this.entityIds[i] = buffer.readEntityId();
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.entityIds = new int[]{buffer.readVarInt()};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,6 +16,7 @@ package de.bixilon.minosoft.protocol.protocol;
|
||||
@SuppressWarnings("unused")
|
||||
public class ProtocolVersions {
|
||||
public static final int
|
||||
V_21W17A = 777,
|
||||
V_21W16A = 776,
|
||||
V_21W15A = 775,
|
||||
V_21W14A = 774,
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user