ProtocolLib

3M Downloads

WrappedBlockData appears to use incorect parameters when invoking CraftMagicNumbers.toLegacyData

Closed this issue ยท 1 comments

commented

This issue is not solved in a development build
It appears to not be ( https://github.com/dmulloy2/ProtocolLib/blob/master/src/main/java/com/comphenix/protocol/wrappers/WrappedBlockData.java#L144 )

Describe the bug
org.bukkit.craftbukkit.util.CraftMagicNumbers#toLegacyData requires a single argument (NMS BlockState), while com.comphenix.protocol.wrappers.WrappedBlockData.NewBlockData#setTypeAndData passes two arguments (Material and block data byte).

Screenshots

Signature of bukkit method
Image

Exception
Image

commented

It looks like the correct method to invoke in the method above is FROM_LEGACY_DATA , which correctly takes a Material and byte, and returns a BlockState