[REQ] Fragile Glass

Discussion in 'Archived: Plugin Requests' started by vrox, Jul 29, 2011.

  1. Offline


    I'm not sure if this is even possible, but could someone make a plugin which makes glass break when you fall on it too hard? Then making it deal extra damage would be nice too, but not required.
  2. Offline


    If the players falls far enough to take damage normally, the block underneath said player could be checked and, if it is glass, could be removed. I can do this for you later today if someone hasn't made it by then.
  3. Offline


    I remember suggesting something similar quite a while back and was told it was a totally ridiculous idea, and it wouldn't work because of physics and how Notch didn't want to program real physics and other stuff...
    Then I forgot about it...

    This is a great idea, I'd love to see it developed.
    Any advancement on it yet?
  4. Offline


    Just got home after a ridiculous terrible day. :eek: I'll get to work on it soon though; coding is calming. :)

    EDIT: Done, see post below.

    Plugin is done. :)

    Link: http://dl.dropbox.com/u/11962432/TooHeavy.jar

    As requested:
    If you fall far enough to take damage, you will break glass if that is the block that you land on.

    Enjoy! :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  5. Offline


    damage can be a short as 4 blocks. will glass break at that height? is it configurable? just curious. thanks Celeo and great response time for coding... hehe
  6. Offline


    Well the only way that I could get the fall event was when a player actually took damage for falling. So I cannot (as far as I have thought) change the minimum fall height. If another coder wishes to prove me wrong, though, please do!
  7. Offline


    I believe the damage calculation can be used to obtain the height:

    Once the height is over 3, it will deal 1 damage for each additional block.
    So a height of 10 blocks will deal 7 damage to the player.

    Using this, you can do getDamage()+3 to obtain the height of the fall, and then allow users to configure it from there. :)
  8. Offline


    @DrBoweNur Ah! Well said. I hadn't thought of that.

    @Face how do you want it to be configured? Do you want the height to be increase (and settable). I was also thinking of adding a configuration so that there is an option to make a sort of "blast radius" where when the player has fallen a certain height (incremented) the blocks next to the one landed on, if glass, will also be destroyed. Say the player falls 5 meters. Only the glass block landed on will be destroyed. At 10, glass in a radius of 2 will be removed. Etc.
  9. Offline


    Make arrows, snowballs and eggs break glass. :D

Share This Page