Fix 1.7 window confirmation exception
[19:42:08 INFO]: DefineOutside joined the game [19:42:08 INFO]: DefineOutside[/127.0.0.1:51317] logged in with entity id 489 at ([world]203.49666077218595, 65.0, 140.4802544136537) [19:42:08 WARN]: [ViaVersion] ERROR IN Protocol1_16_4To1_17 IN REMAP OF WINDOW_CONFIRMATION (0x07) [19:42:08 WARN]: io.netty.handler.codec.DecoderException: com.viaversion.viaversion.exception.InformativeException: Please post this error to https://github.com/ViaVersion/ViaVersion/issues and follow the issue template [19:42:08 WARN]: {Packet Type: null, Type: Unsigned Byte, Data: [], Source 0: com.viaversion.viabackwards.protocol.protocol1_16_4to1_17.packets.BlockItemPackets1_17$4 (Anonymous), Packet ID: -1} [19:42:08 WARN]: Actual Error: [19:42:08 WARN]: at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:477) [19:42:08 WARN]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [19:42:08 WARN]: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) [19:42:08 WARN]: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [19:42:08 WARN]: at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [19:42:08 WARN]: at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [19:42:08 WARN]: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [19:42:08 WARN]: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [19:42:08 WARN]: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [19:42:08 WARN]: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [19:42:08 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) [19:42:08 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) [19:42:08 WARN]: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) [19:42:08 WARN]: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [19:42:08 WARN]: at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) [19:42:08 WARN]: at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [19:42:08 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [19:42:08 WARN]: Caused by: com.viaversion.viaversion.exception.InformativeException: Please post this error to https://github.com/ViaVersion/ViaVersion/issues and follow the issue template
This fixes this exception with window confirmations. Tested on Paper 1.19.
You can't change it in one place only, either everywhere or nowhere at all. this happens because ViaRewind maps it to a byte, but Viabackwards to an unsigned byte
The vanilla client writes and reads this as a byte, not an unsigned byte. The ViaRewind mappings are correct
That doesn't matter here, all that matters is consistency for the internally mapped type, which this pr only fixes for a single usage. it can either be all unsigned byte or all byte, but right now it is still both
https://github.com/ViaVersion/ViaRewind/commit/9cbfc5944dec314b3034cec502d5bd6bba3f1ed0