NBT-API

NBT-API

98.9k Downloads

Doesn't work for FallingBlock

Schuwi opened this issue ยท 1 comments

commented

When trying to modify NBTTags on a FallingBlock Entity the following errors occur:

[12:35:57 WARN]: java.lang.NoSuchMethodException: net.minecraft.server.v1_12_R1.EntityFallingBlock.b(net.minecraft.server.v1_12_R1.NBTTagCompound)
[12:35:57 WARN]:        at java.lang.Class.getMethod(Unknown Source)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.getEntityNBTTagCompound(NBTReflectionUtil.java:203)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTEntity.getCompound(NBTEntity.java:15)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.setInt(NBTReflectionUtil.java:382)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTCompound.setInteger(NBTCompound.java:52)
[12:35:57 WARN]: java.lang.NoSuchMethodException: net.minecraft.server.v1_12_R1.EntityFallingBlock.b(net.minecraft.server.v1_12_R1.NBTTagCompound)
[12:35:57 WARN]:        at java.lang.Class.getMethod(Unknown Source)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.getEntityNBTTagCompound(NBTReflectionUtil.java:203)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTEntity.getCompound(NBTEntity.java:15)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.valideCompound(NBTReflectionUtil.java:300)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.setInt(NBTReflectionUtil.java:386)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTCompound.setInteger(NBTCompound.java:52)
[12:35:57 WARN]: java.lang.NoSuchMethodException: net.minecraft.server.v1_12_R1.EntityFallingBlock.a(net.minecraft.server.v1_12_R1.NBTTagCompound)
[12:35:57 WARN]:        at java.lang.Class.getMethod(Unknown Source)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.setEntityNBTTag(NBTReflectionUtil.java:218)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTEntity.setCompound(NBTEntity.java:19)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTReflectionUtil.setInt(NBTReflectionUtil.java:392)
[12:35:57 WARN]:        at de.tr7zw.itemnbtapi.NBTCompound.setInteger(NBTCompound.java:52)

(I truncated the stack trace to the stack of this plugin)

Cause: Methods a(NBTTagCompound) and b(NBTTagCompound) in EntityFallingBlock are protected but this plugin expects these methods to be public.

commented

Well, this issue has been inactive. As far as I can tell the save/load method for entities has never been a or b, especially not in 1.12 where the "getter" got the name "save". Going to close this issue since there've been many rewrites since 2017, that hopefully caught whatever happened here.