Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 16:40:12 +01:00
Send empty list instead of implicit byte for metadata
Dieser Commit ist enthalten in:
Ursprung
a642e46eb3
Commit
03b7f995f6
@ -19,6 +19,8 @@ import us.myles.ViaVersion.api.type.types.version.Types1_14;
|
|||||||
import us.myles.ViaVersion.packets.State;
|
import us.myles.ViaVersion.packets.State;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
|
public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -71,7 +73,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
|
|||||||
map(Type.SHORT); // 9 - Velocity X
|
map(Type.SHORT); // 9 - Velocity X
|
||||||
map(Type.SHORT); // 10 - Velocity Y
|
map(Type.SHORT); // 10 - Velocity Y
|
||||||
map(Type.SHORT); // 11 - Velocity Z
|
map(Type.SHORT); // 11 - Velocity Z
|
||||||
create(wrapper -> wrapper.write(Type.UNSIGNED_BYTE, (short) 0xff)); // Metadata is no longer sent in 1.15, so we have to send an empty one
|
create(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
|
||||||
|
|
||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
@Override
|
@Override
|
||||||
@ -156,7 +158,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
|
|||||||
map(Type.DOUBLE); // 4 - Z
|
map(Type.DOUBLE); // 4 - Z
|
||||||
map(Type.BYTE); // 5 - Yaw
|
map(Type.BYTE); // 5 - Yaw
|
||||||
map(Type.BYTE); // 6 - Pitch
|
map(Type.BYTE); // 6 - Pitch
|
||||||
create(wrapper -> wrapper.write(Type.UNSIGNED_BYTE, (short) 0xff)); // Metadata is no longer sent in 1.15, so we have to send an empty one
|
create(wrapper -> wrapper.write(Types1_14.METADATA_LIST, new ArrayList<>())); // Metadata is no longer sent in 1.15, so we have to send an empty one
|
||||||
|
|
||||||
handler(getTrackerHandler(Entity1_15Types.EntityType.PLAYER, Type.VAR_INT));
|
handler(getTrackerHandler(Entity1_15Types.EntityType.PLAYER, Type.VAR_INT));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren