Cobblestone Generation (Generators)

Discussion in 'Plugin Development' started by Tster, Feb 19, 2012.

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


    How do I find out when cobblestone is generated?
    I would assume that I hook into a Physics Event, and just use an if statement to check if the generated block is cobble, but it seems the code I am writing takes place even when obsidian is meant to be made
  2. Offline


    I need to know that aswell, in order to disable cobble/stone generation without violating waterflow rules
  3. Offline


    hmm could we hook into BlockFromTo? hqSparx
  4. Offline


    I already tried that, but it affects water/lava flow. You wouldnt be able to spill water to make yourself a nice obsidian platform, for example. Its not working perfectly aswell, you can bypass that simply placing torch between fluids :(
  5. Offline


  6. Offline


    Have you tried BlockFormEvent? Otherwise I have no idea except that your code may be wrong :p
  7. Offline


    yeah, i've tried, but thats simply not satysfying me - you can easily bypass that
    the thing is, I dont know how to detect @ BlockPhysics if the stone was created by water/lava flow
  8. Offline


    Havent tried but something like this? Just read the post above nvm
    I dont think its possible with physics as physics is an update to a block such as a cactus
    2. @EventHandler
    3. public void BlockForm(BlockFormEvent event){
    4. if(event.getNewState().getType().equals(Material.COBBLESTONE)){
    5. event.setCancelled(true);
    6. }
    7. }
Thread Status:
Not open for further replies.

Share This Page