-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Able to replicate this error on interaction with any item inside of Minecraft Spigot server 1.20.6. There was a change to how the item meta data was structured as of 1.20.6. See further below for Spigot's developer notes for 1.20.6.
[11:39:26] [Server thread/ERROR]: [CustomItemsLib] Unhandled exception occurred in onPacketSending(PacketEvent) for CustomItemsLib java.lang.IllegalStateException: Unable to invoke method public abstract void net.minecraft.network.codec.StreamEncoder.encode(java.lang.Object,java.lang.Object) at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:25) ~[?:?] at com.comphenix.protocol.wrappers.WrappedStreamCodec.encode(WrappedStreamCodec.java:39) ~[?:?] at com.comphenix.protocol.events.PacketContainer.serializeToBuffer(PacketContainer.java:405) ~[?:?] at com.comphenix.protocol.events.PacketContainer.deepClone(PacketContainer.java:251) ~[?:?] at one.lindegaard.CustomItemsLib.compatibility.ProtocolLibHelper$1.onPacketSending(ProtocolLibHelper.java:61) ~[?:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:219) ~[?:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokeUnpackedPacketSending(SortedPacketListenerList.java:204) ~[?:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[?:?] at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:139) ~[?:?] at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:553) ~[?:?] at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:526) ~[?:?] at com.comphenix.protocol.injector.netty.manager.NetworkManagerInjector.onPacketSending(NetworkManagerInjector.java:100) ~[?:?] at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector.processOutbound(NettyChannelInjector.java:563) ~[?:?] at com.comphenix.protocol.injector.netty.channel.NettyChannelInjector$2.doProxyRunnable(NettyChannelInjector.java:466) ~[?:?] at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.proxyRunnable(NettyEventLoopProxy.java:43) ~[?:?] at com.comphenix.protocol.injector.netty.channel.NettyEventLoopProxy.execute(NettyEventLoopProxy.java:252) ~[?:?] at net.minecraft.network.NetworkManager.b(NetworkManager.java:358) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.NetworkManager.a(NetworkManager.java:334) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.network.ServerCommonPacketListenerImpl.a(ServerCommonPacketListenerImpl.java:265) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.network.ServerCommonPacketListenerImpl.b(ServerCommonPacketListenerImpl.java:246) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.level.EntityPlayer$1.a(EntityPlayer.java:299) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.world.inventory.Container.b(Container.java:197) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.world.inventory.Container.a(Container.java:177) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:645) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.level.EntityPlayer.h(EntityPlayer.java:649) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.players.PlayerList.a(PlayerList.java:396) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.a(ServerConfigurationPacketListenerImpl.java:148) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.a(SourceFile:22) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.protocol.configuration.ServerboundFinishConfigurationPacket.a(SourceFile:8) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0(PlayerConnectionUtils.java:34) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:162) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1242) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.util.thread.IAsyncTaskHandler.A(SourceFile:136) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.bu(MinecraftServer.java:1221) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.A(MinecraftServer.java:1214) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:145) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.v_(MinecraftServer.java:1186) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1071) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:311) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.network.RegistryFriendlyByteBuf.k(int)" because "var0" is null at net.minecraft.network.protocol.game.PacketPlayOutWindowItems.a(SourceFile:39) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.codec.StreamCodec$6.encode(SourceFile:42) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.codec.StreamCodec$9.a(SourceFile:97) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at net.minecraft.network.codec.StreamCodec$9.encode(SourceFile:87) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4171-Spigot-342f493-87d0a33] at com.comphenix.protocol.reflect.accessors.DefaultMethodAccessor.invoke(DefaultMethodAccessor.java:23) ~[?:?] ... 42 more [11:39:26] [Server thread/ERROR]: Parameters: net.minecraft.network.protocol.game.PacketPlayOutWindowItems@5398db18[ b=0 c=1 d=[0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air, 0 air] e=0 air ]
Developer notes
- [ ]The deprecated/legacy potion APIs, Potion and PotionData have been removed. Use the other classes available in the org.bukkit.potion package since Minecraft 1.9 / 2016.
- [ ]Effect#POTION_BREAK now requires a Color rather than Potion instance.
- [ ]Particle#SPELL_MOB_AMBIENT has been removed and Particle#SPELL_MOB now requires a Color rather than Potion instance.
- [ ]Material#SCUTE is now Material#TURTLE_SCUTE
- Several other fields (particularly Particles, Enchantments and Potions) have been renamed to match their Minecraft name/key (tbc).
- [ ]api-version in plugin.yml now accepts minor versions (eg, 1.20.5).
- [ ]EntityMountEvent and EntityDismountEvent have been moved to the org.bukkit.event.entity package.
- [ ]Enchantment#getItemTarget and LivingEntity#getCategory have been replaced by Tags.
- [ ]EntityShootBowEvent#setConsumeItem is not currently functional (default behaviour is retained).
- [ ]getBasePotionType and setBasePotionType methods in various classes are now nullable and null should be used instead of PotionType#UNCRAFTABLE (which has been removed) (tbc).
- [ ]AttributeModifier should now use an EquipmentSlotGroup rather than an EquipmentSlot to take into account Vanilla changes.
- [ ]APIs mirroring BungeeCord are available for transfer and cookie functionality - Player#transfer,retrieveCookie,storeCookie.
- [ ]Writable books can only contain pages/content, and not other data such as title and author (which is only available on written books). While the BookMeta interface is currently applicable to both, future uses of writable books should use WritableBookMeta.
- [ ]APIs for most new ItemMeta functionality have been added. There may be some minor changes to the ItemMeta API to take into account limitations of the more strict internal validation now used by the Vanilla server. Fortunately, the ItemMeta API is very flexible and quite close to the system adopted by Vanilla in this release. Please let us know of any limitations or changes to behaviour so they can be examined and fixed or documented.
- [ ]Dependencies have been upgraded, including SQLite which now retains the previously foreshadowed removal of support for Statement#getGeneratedKeys.
- [ ]Work continues on integrating experimental changes, including throughout this release cycle. We hope to land some significant additional changes in the early stages before 1.20.6 becomes the default version (ie, the next few weeks). Please review the 1.20 release notes and forum for further detail.