Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on inventory click in Minecraft 1.21.4 #258

Open
Tweentyy opened this issue Jan 25, 2025 · 0 comments
Open

Error on inventory click in Minecraft 1.21.4 #258

Tweentyy opened this issue Jan 25, 2025 · 0 comments

Comments

@Tweentyy
Copy link

Tweentyy commented Jan 25, 2025

Describe the bug
I created a custom inventory in 1.21.4, I can open it and fill it with custom items but when I click on an item in this inventory, I get disconnected. If they're ‘default’ items I don't have the problem though.

To Reproduce
Steps to reproduce the behavior:

  1. Create an inventory
  2. Add custom item with a custom model data which exists in your ressource pack, if it doesn't exist, a simple click will work, but a shift click won't work and you'll be disconnected
    No error on simple ItemStack without custom model data
  3. Interact with one
  4. Get disconnected
    Expected behavior
    A simple click/shift click on an item

Errors
Error when Custom Model Data is specified and valid:

io.netty.handler.codec.CorruptedFrameException: Packet sent for class dev.simplix.protocolize.velocity.packets.GeneratedClickWindowWrapper was too big (expected 94 bytes, got 153 bytes)
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.handleOverflow(MinecraftDecoder.java:111) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:89) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:60) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]

Error when Custom Model Data is specified and invalid OR when custom model data is invalid and shift click:

[10:52:03 ERROR] [Protocolize]: Unable to read item stack from buffer in protocol version 769
java.lang.RuntimeException: Unable to read ContainerLootComponentImpl from item
        at dev.simplix.protocolize.api.item.StructuredItemStackSerializer.readComponent(StructuredItemStackSerializer.java:129) ~[?:?]
        at dev.simplix.protocolize.api.item.StructuredItemStackSerializer.read(StructuredItemStackSerializer.java:41) ~[?:?]
        at dev.simplix.protocolize.api.item.ItemStackSerializer.read(ItemStackSerializer.java:48) ~[?:?]
        at dev.simplix.protocolize.data.packets.ClickWindow.read(ClickWindow.java:92) ~[?:?]
        at dev.simplix.protocolize.velocity.packet.VelocityProtocolizePacket.decode(VelocityProtocolizePacket.java:55) ~[?:?]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:83) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:60) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity-3.4.0-SNAPSHOT-463.jar:3.4.0-SNAPSHOT (git-371e6860-b463)]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.io.IOException: invalid tag id "-56"
        at net.querz.nbt.io.NBTInputStream.readTag(NBTInputStream.java:68) ~[?:?]
        at net.querz.nbt.io.NBTInputStream.readRawTag(NBTInputStream.java:62) ~[?:?]
        at dev.simplix.protocolize.data.util.NamedBinaryTagUtil.readTag(NamedBinaryTagUtil.java:35) ~[?:?]
        at dev.simplix.protocolize.data.item.component.ContainerLootComponentImpl.read(ContainerLootComponentImpl.java:21) ~[?:?]
        at dev.simplix.protocolize.api.item.StructuredItemStackSerializer.readComponent(StructuredItemStackSerializer.java:127) ~[?:?]
        ... 37 more

Proxy environment
Velocity-3.4.0
Protocolize 2.4.3

Minecraft versions used
Paper - 1.21.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant