mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-21 12:07:38 +01:00
Move config option check for player face fix into packet handlers (#913)
This commit is contained in:
parent
498bec9065
commit
04a692022a
@ -237,8 +237,10 @@ public class EntityPacketRewriter1_13 extends LegacyEntityRewriter<ClientboundPa
|
|||||||
positionAndLook.send(Protocol1_13To1_12_2.class);
|
positionAndLook.send(Protocol1_13To1_12_2.class);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ViaBackwards.getConfig().isFix1_13FacePlayer()) {
|
|
||||||
PacketHandler movementRemapper = wrapper -> {
|
PacketHandler movementRemapper = wrapper -> {
|
||||||
|
if (!ViaBackwards.getConfig().isFix1_13FacePlayer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final double x = wrapper.passthrough(Types.DOUBLE);
|
final double x = wrapper.passthrough(Types.DOUBLE);
|
||||||
final double y = wrapper.passthrough(Types.DOUBLE);
|
final double y = wrapper.passthrough(Types.DOUBLE);
|
||||||
final double z = wrapper.passthrough(Types.DOUBLE);
|
final double z = wrapper.passthrough(Types.DOUBLE);
|
||||||
@ -248,7 +250,6 @@ public class EntityPacketRewriter1_13 extends LegacyEntityRewriter<ClientboundPa
|
|||||||
protocol.registerServerbound(ServerboundPackets1_12_1.MOVE_PLAYER_POS_ROT, movementRemapper); // Player Position And Look (serverbound)
|
protocol.registerServerbound(ServerboundPackets1_12_1.MOVE_PLAYER_POS_ROT, movementRemapper); // Player Position And Look (serverbound)
|
||||||
protocol.registerServerbound(ServerboundPackets1_12_1.MOVE_VEHICLE, movementRemapper); // Vehicle Move (serverbound)
|
protocol.registerServerbound(ServerboundPackets1_12_1.MOVE_VEHICLE, movementRemapper); // Vehicle Move (serverbound)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerRewrites() {
|
protected void registerRewrites() {
|
||||||
|
Loading…
Reference in New Issue
Block a user