ProtocolLib

3M Downloads

StreamSerializer deserializeItemStack throw error.

MikuSnow opened this issue ยท 2 comments

commented

in version 1.20.6
RegistryFriendlyByteBuf has no method "readItemStack"

commented

Can you please provide more details about your issue. (e.g. errors, a /protocol dump file, logs, etc.)

commented

Can you please provide more details about your issue. (e.g. errors, a /protocol dump file, logs, etc.)

The logs:
https://pastebin.com/xrJcjyn6
The dump:
https://pastebin.com/29hb6pGv

The test code:

    @EventHandler
    public void onPlayerJoin(@NotNull PlayerJoinEvent event) {
        Player player = event.getPlayer();
        for (@Nullable ItemStack storageContent : player.getInventory().getStorageContents()) {
            System.out.println("#1");
            try {
                System.out.println("#2");
                String s = StreamSerializer.getDefault().serializeItemStack(storageContent);
                System.out.println("#3");
                System.out.println(s);
            } catch (IOException e) {
                System.out.println("#4");
                throw new RuntimeException(e);
            }

        }
    }