ProtocolLib throws errors while using ItemAdder custom blocks
RinoRika opened this issue ยท 2 comments
- This issue is not solved in a development build
Describe the bug
Minecraft server version: 1.21.5 paper
When using ItemAdder to create some custom blocks, you place it and you get an error in console:
Could not pass event BlockPlaceEvent to ItemsAdder v4.0.11
java.lang.IllegalArgumentException: Cannot create instance of class net.minecraft.network.protocol.game.ClientboundAnimatePacket
at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newInstance(StructureCache.java:95) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:82) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:217) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.events.PacketContainer.(PacketContainer.java:120) ~[ProtocolLib.jar:?]
at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:362) ~[ProtocolLib.jar:?]
In the game the block was placed but it can't behave properly. For example, the item doesn't decrease when you place it down in survival mode, and you can't open a chest, etc.
idk if the problem is created by ItemAdder, but the error message seems to be a misuse of mojang api by ProtocolLib.
To Reproduce
Steps to reproduce the behavior:
- Install paper 1.21.5, ProtocolLib and ItemAdder.
- Load some ItemAdder contents with custom blocks.
- Get the item and place it down.
- Error in console, and game behaves improperly.
Expected behavior
No error thrown in console, and the block should behave properly.
Version Info
ProtocolLib Version: ProtocolLib v5.4.0-SNAPSHOT-750
Bukkit Version: 1.21.5-R0.1-SNAPSHOT
Server Version: 1.21.5-114-a1b3058 (MC: 1.21.5)
Java Version: 23.0.2
Additional context
Haven't tried on other environments.
can't exactly confirm, but this error has definitely appeared for me as well when running the newest build marked for 1.21.3-1.21.6 on a 1.21.4 server. The updates to the 1.21.6 commit were the culprit as the build immediately previous worked just as expected.