Stop Falling Sand From Breaking?

Discussion in 'Spigot Plugin Development' started by DireLegendDev, Jul 8, 2015.

  1. Title says it all. I have researched but I have no idea how to do it.
     
  2. You would have to check foe a falling sand entity, im not sure how to check when it breas, maybe just check thw block underneath the entity abd if its something that can break sand, set the block above the torch or something to sand and make sure that the other sand isnt dropped
     
  3. Dont hide your bumps, and only bump every 24 hours please... someone has replied gou just have to be patient
     
    • Funny Funny x 2
    • Agree Agree x 1
  4. Here is something I tried. This didn't work either.
    Code (Text):
        @SuppressWarnings("deprecation")
        @EventHandler
        public void EntityChangeBlockEvent(BlockPlaceEvent e) {
            if (e.getBlock().getType() == Material.SAND) {
                e.setCancelled(true);
                Bukkit.getWorld("world").spawnFallingBlock(e.getBlock().getLocation(), Material.SAND, (byte) 6).setDropItem(false);
            }
        }
     
  5. Ok. I tried to help. o/
     
  6. Showing me a link to google isn't helping because I have been using it for 30 minutes looking for a solution.
     
  7. Well, all you said was "i researched" which doesnt mean shit. Everyone says that they've researched, and they all know Java. Its quite apparent most of those people are lying.

    Since you didnt include any example cases of things you tried and failed at, its only natural to assume you were one of these people. So I gave you a relevant link which contains result after result of relevant information and answers.

    Now. If you have a more specific question, that'd be great. Show us what you've tried, etc. Explain what happens in those attempts, and explain in more detail what you expected to happen instead. etc etc.
     
    • Agree Agree x 1
  8. I have nothing else except what I posted above and other code that didn't work in the thread link I posted.
     
    • Agree Agree x 1
  9. sothatsit

    Patron

    Do you want it to just sit on the ground? Or break the block that would normally break it?
     
  10. When sand falls on chests and slabs it breaks as of now. I just wait it to fall and sit there like it normally does falling on full blocks.
     
  11. From reading for like 10 minutes, it looks like either the BlockPhysicsEvent or the EntityChangeBlockEvent would work for this. Also, the thread that @BillyGalbreath posted seems to give a viable method.

    good1
     
  12. Thread was solved almost a year ago. Someone was just salty and decided to sign up only to revive this thread with irrelevant flame bait.
     
  13. oh my god I didn't even realize that. That's funny tbh