Is your feature request related to a problem? Please describe.
-
Now, commonly BlockPhysicsEvent will be called for 7 times when one block change(the "root" block). Paper's getSourceBlock() allows checking whether the block being updated is the root block itself, but it's veiled for most developers, we can simply add a method named like isSource() and simply return sourceBlock == block.
-
There is a BlockData field called changed in BPE, however, we can only use getChangedType() instead of getting the block data directly, we can simply add a method like getChangedBlockData() and simply return it.
Describe the solution you'd like
Described above.
Describe alternatives you've considered
Aside from this, we can even add a new event called BlockChangedEvent for every source event, which is perfect for block change recording and monitor. (at World#notifyAndUpdatePhysics, blockdata1 is the old block)
Additional context
I have done some tests and works smoothly.
Is your feature request related to a problem? Please describe.
Now, commonly BlockPhysicsEvent will be called for 7 times when one block change(the "root" block). Paper's
getSourceBlock()allows checking whether the block being updated is the root block itself, but it's veiled for most developers, we can simply add a method named likeisSource()and simply returnsourceBlock == block.There is a BlockData field called
changedin BPE, however, we can only usegetChangedType()instead of getting the block data directly, we can simply add a method likegetChangedBlockData()and simply return it.Describe the solution you'd like
Described above.
Describe alternatives you've considered
Aside from this, we can even add a new event called
BlockChangedEventfor every source event, which is perfect for block change recording and monitor. (atWorld#notifyAndUpdatePhysics,blockdata1is the old block)Additional context
I have done some tests and works smoothly.