BlockBreakEvent and Redstone ore

Discussion in 'Plugin Development' started by ThatBenderGuy, Jun 20, 2015.

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

    ThatBenderGuy

    I am using a block break event (marked as e) and i am checking for redstone ore. The problem is that it checks for the "non-activated" redstone. Is there a special material for an activated redstone ore? This is my current "if" statement

    Code:
    if(e.getBlock().getType() == Material.REDSTONE_ORE)
    
    any ideas?
     
    Last edited: Jun 20, 2015
  2. the material is I think GLOWING_REDSTONE_ORE
     
  3. Offline

    567legodude

    @ThatBenderGuy If the other solution doesn't work, then check for Material.matchMaterial("74") I think
     
  4. Offline

    _Error

    As @Bram0101 said,
    Code:
    if(e.getBlock().getType() == Material.GLOWING_REDSTONE_ORE)
     
  5. ids are not recommend because they are removed soon.

    @Bram0101's and @_Error's solutions are better
    @ThatBenderGuy please mark thread as solved.
     
  6. Offline

    _Error

    For Ingame commands, They already are removed, And i'm pretty positive in Bukkit/Spigot 1.9 it will be removed from the code too and then item id's will be something to remember.
     
  7. I actually think that they won't completely remove it, because a lot of plugins still count on id's and it's also really easy for config to use it. If they are going to remove it a lot of plugins will need to be updated, including abandoned plugins that would still work right now.
     
  8. Offline

    _Error

    Good point, but I was asking myself that too when minecraft did that, I did many and many command block projects with it, I had to abandon my projects with 500+ Command blocks.


    Anyway. Back to topic
     
  9. Offline

    567legodude

    @_Error You could make an MCEdit filter that looks inside command blocks and replaces the numbers with the material name.
     
Thread Status:
Not open for further replies.

Share This Page