Solved Getting a block destroyed by a block

Discussion in 'Plugin Development' started by WolfMage1, Apr 30, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    WolfMage1

    If I have a grass block, and on top of that grass block is a flower

    If I destroy the grass block, the flower because of Minecraft physics is destroyed as well,

    How do I get the entity that was destroyed as a result of the grass block being broken? (BlockBreakEvent isn't called and I tried messing around with the BlockPhysicsEvent too)
     
    Last edited: Apr 30, 2016
  2. Offline

    DoggyCode™

    BlockBreakEvent must be called as YOU ("If I destroy") break the grass, so I'd check for the BlockFace.UP, and compare it to your flower.
     
  3. Offline

    567legodude

    @WolfMage1 @DoggyCode™ Use BlockPhysicsEvent, it is called when a physics check is needed. I use this method to prevent signs from falling off walls when you break the block behind them.
     
  4. Offline

    Abstract97

Thread Status:
Not open for further replies.

Share This Page