Filled Remove falling animation from sand block to prevent lag

Discussion in 'Plugin Requests' started by tspierer2, Dec 28, 2018.

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


    Minecraft version: 1.12.2 +

    Suggested name: AntiFalling
    (I cant come up with good name)

    What I want: A plugin that prevents the falling animation of sand, concrete powder, gravel, etc. and makes them fall immediately to the spot they should fall to. This will prevent people trying to lag the creative server with huge amounts of sand without me needing to disable using sand with worldedit. I am not sure if this plugin is possible to make, hopefully something can be done.

    No due date.
  2. Offline


  3. Offline


    I see what your trying to do but wouldnt simply cancelling the event (on Block breakEvent), setting the block to air, and dropping the item at the players feet accomplish this. player.getWorld().dropItem(player.getLocation(),e.getItem())
    ahhh though i just realized there could be sand blocks on top of that sand block that would fall....
    I mean you could possibly do a while loop that says while Block t.getType() == Material.SAND, create a new item stack of sand based on a counter that incremented based on how much sand was on top of the broken block. just get the sand block on top by creating a new block from the BlockFace.UP. Ex. if(e.getItem().getType() == Material.SAND)
    Block t = e.getItem().getRelative(BlockFace.UP)
    //do the other stuff here just throwing ideas idk if block break gets the broken item if thats the case it would be e.getItem().getItemStack();
    Last edited: Dec 28, 2018
  4. Offline


    these are bad events onPlace and break because u could also break a block under the sand that causes it to fall, and the plugin won't listen to the falling event. Despite that, the author would need to import all the region protection plugins to make sure players can't place the falling blocks in places they aren't allowed to build in.
    Last edited: Dec 28, 2018
  5. Offline


    Hey I finished the plugin. I didn't know if you wanted the sand to break when it falls on torches and stuff so the sand does break when it falls on torches and plants(like it normally would) if you want that to be removed and have nothing fall at all just tell me and ill remove that.

    If any bugs just message me.
  6. Offline


    the plugin has no issues with protected areas, and works very well as I wanted it to. Prevents fps lag, not so much tps lag, but my one bug is that it doesn't detect meta ids, so when you place different colored concrete powders they are set to normal white powder with meta ID 0, and for anvils aswell, they are rotated to anvil:0, and red sand turns to normal sand:0.
    thank u so much for making the plugin!
  7. Offline


    Fixed the issue. Its the same link. I had support for 1.13 to future proof when you do upgrade but i removed it to fix the bug and make everything easier. Tested it and everything works on 1.12.2
  8. Offline


    very well-made plugin, thank u for your work
Thread Status:
Not open for further replies.

Share This Page