Falling Blocks Breaking?

Discussion in 'Plugin Development' started by Live2Pwn, Jul 21, 2013.

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

    Live2Pwn

    Hey, so I am creating a plugin that deals with large masses of falling blocks. The problem is, sometimes these blocks hit the ground unevenly and fall as an item, is there an event for this so I can cancel it? Or is there a way I can prevent this from happening?
    Thanks for the help xD
     
  2. Offline

    chasechocolate

    I believe the event is EntityChangeBlockEvent.
     
  3. Offline

    Live2Pwn

    chasechocolate Ok, but the thing is the event doesnt trigger when the block drops as an item. It only triggers when the falling block entity becomes a block.

    EDIT: I also tried EntityDeathEvent (because, well you know, Falling Block is an entity after all...) and that doesnt work either....:/
     
  4. Offline

    StrangeOne101

    Code:
    block.setDropItem(false);
    "block" being the falling sand entity.
     
  5. Offline

    Live2Pwn

    Closer, but the blocks still disappear... is there maybe some way I can make the blocks bounce when they "break"? Or maybe become a solid block?

    Anyone?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  6. Offline

    xTrollxDudex

    Live2Pwn
    This one guy I knew made a scheduler/timer for when the block hit the ground and turned it into a block at that location, then despawned the entity
     
Thread Status:
Not open for further replies.

Share This Page