Discussion in 'Plugin Development' started by epicfacecreeper, Dec 18, 2013.
I need to call the grow() method in BlockSapling. How do I get the instance of that block?
It looks like you could call "getNMSBlock" on CraftBlock, but it's private, so you'd have to use reflection to make it accessible (I think).
I'm not an expert, though, maybe there's a better way!
EDIT: Maybe a better way is to do what getNMSBlock does and call CraftMagicNumbers.getBlock(block); This looks pretty easy, you only need to tie into OBC.CraftMagicNumbers and NMS.BlockSapling.
Actually, I figured it out myself. You can call getType() in nms.World to get the block, which you can perform operations on.
Separate names with a comma.