NBT-API

NBT-API

98.9k Downloads

Fails to determine minecraft version (Index 3 out of bounds for length 3)

RealKomander opened this issue ยท 2 comments

commented

I'm trying to update VillagerTradeLimiter plugin to minecraft 1.21.1. I use the latest version of NBT API, but get this error on several different occasions:
[13:49:09 WARN]: [NBTAPI] [NBTAPI] Error while trying to resolve the class 'inventory.CraftMetaItem'!
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
...

[13:49:09 WARN]: [NBTAPI] [NBTAPI] Error while trying to resolve the class 'inventory.CraftItemStack'!
java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
...

And something like this:
[13:49:09 ERROR]: Could not pass event PlayerInteractEntityEvent to VillagerTradeLimiter v1.6.4
java.lang.ExceptionInInitializerError: null
at VillagerTradeLimiter.jar/de.tr7zw.changeme.nbtapi.utils.nmsmappings.ReflectionMethod.(ReflectionMethod.java:24) ~[VillagerTradeLimiter.jar:?]
at...
...
...
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3

full log

Is this error caused by NBT API?

commented

That is some incorrectly shaded old version, 100% not compatible with 1.21.

commented

Thank you, now I managed to shade it properly