ViaRewind

ViaRewind

7.4k Downloads

After upgrading to ViaRewind 1.4.0-> 1.5.0, players began to cancel movements in water and semi-blocks

gomin1d opened this issue · 4 comments

commented

I updated the Via plugins.

Old version:
ViaRewind 1.4.0
ViaBackwards 2.4.0
ViaVersion 2.2.3

New version:
ViaRewind 1.5.0
ViaBackwards 3.0.1
ViaVersion 3.0.1

There is a problem on new versions, here is a video demonstrating the problem:
water https://www.youtube.com/watch?v=ThHEgzmpj1M&feature=youtu.be
semi-blocks https://www.youtube.com/watch?v=p43KQ0XrKP0&feature=youtu.be

server core version: paperspigot 1.12.2
client minecraft version: 1.8.9

cancels anticheat movements. why then did I write a complaint here? because before with the old version of viarewind with the same anticheat settings everything worked fine => therefore via changes created a problem

thanks in advance for any help

commented

nice support

commented

Thanks.

commented

@krusic22

empirically, I determined that the problem is in this piece of code:
https://github.com/ViaVersion/ViaRewind/blob/master/core/src/main/java/de/gerrygames/viarewind/protocol/protocol1_8to1_9/packets/PlayerPackets.java#L193

when I roll back this piece of code to version:

        //Player Position And Look
        protocol.registerOutgoing(State.PLAY, 0x2E, 0x08, new PacketRemapper() {
            @Override
            public void registerMap() {
                map(Type.DOUBLE);
                map(Type.DOUBLE);
                map(Type.DOUBLE);
                map(Type.FLOAT);
                map(Type.FLOAT);
                map(Type.BYTE);
                handler(new PacketHandler() {
                    @Override
                    public void handle(PacketWrapper packetWrapper) throws Exception {
                        int id = packetWrapper.read(Type.VAR_INT);
                        PacketWrapper confirm = new PacketWrapper(0x00, null, packetWrapper.user());

                        confirm.write(Type.VAR_INT, id);

                        PacketUtil.sendToServer(confirm, Protocol1_8TO1_9.class);
                    }
                });
                handler(new PacketHandler() {
                    @Override
                    public void handle(PacketWrapper packetWrapper) throws Exception {
                        PlayerPosition pos = packetWrapper.user().get(PlayerPosition.class);
                        pos.setPos(packetWrapper.get(Type.DOUBLE, 0), packetWrapper.get(Type.DOUBLE, 1), packetWrapper.get(Type.DOUBLE, 2));
                        pos.setYaw(packetWrapper.get(Type.FLOAT, 0));
                        pos.setPitch(packetWrapper.get(Type.FLOAT, 1));
                    }
                });
            }
        });

then the problem is solved.
but I don’t want to rollback this code in its entirety, I don’t know what it might affect. maybe you can help me make a more correct fix?

commented

the problem is solved by swapping these two code blocks
please include this fix in a future release
image