mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-24 11:36:51 +01:00
Retrieve the correct Nbt base class
This commit is contained in:
parent
fb441b4910
commit
22beae23e0
@ -852,9 +852,15 @@ public class MinecraftReflection {
|
||||
returnTypeMatches(tagCompoundContract).
|
||||
build()
|
||||
);
|
||||
Class<?> nbtBase = selected.getReturnType().getSuperclass();
|
||||
|
||||
// That can't be correct
|
||||
if (nbtBase == null || nbtBase.equals(Object.class)) {
|
||||
throw new IllegalStateException("Unable to find NBT base class: " + nbtBase);
|
||||
}
|
||||
|
||||
// Use the return type here too
|
||||
return setMinecraftClass("NBTBase", selected.getReturnType());
|
||||
return setMinecraftClass("NBTBase", nbtBase);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user