SPOUT can't change Block Strenght!

Discussion in 'Plugin Development' started by TMAsantos, Oct 10, 2011.

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

    TMAsantos

    Hey guys.

    Is it possible to change the block Strenght? to reduce the mining time?
    I only know setInstantMine()... I cant find nothing more about BlockDamage here http://jd.bukkit.org/doxygen/index.html.

    Thanks,
    TMAsantos
     
  2. Offline

    JoshuaBehrens

    InstantMining or not. Basicly that's it. You could buffer all blocks that get damaged and after a certain time instant-mine them.
     
  3. It's possible with Spout, but you'd need both Spout and SpoutCraft.
     
  4. Offline

    JoshuaBehrens

    I don't know whether you can recommand spout because of the many errors it threw the last times with any plugins when using the latest version.
     
  5. Offline

    Afforess

    I have no idea what you're talking about - Spout is working fine with 99.9% of bukkit plugins.

    Anyway, it's really easy to do with Spout. It doesn't need Spoutcraft for it to work, but the breaking animation will be too slow/fast without it (but it will break on time).

    Anyway, just use this:

    MaterialData.getBlock(id).setHardness(...);
     
  6. Offline

    JoshuaBehrens

    @Afforess: some threads beginning with "Recommanded Build : ####" makes me feel that spout is not that working fine.
     
  7. Offline

    Afforess

    ?

    We always use the latest RB in the thread title that it works with - because that's what bukkit's wants plugins to do. Spout works fine.
     
  8. Offline

    desht

    Never had a problem when using a RB of Spout with the corresponding RB of CraftBukkit (and the dev.bukkit.org Spout page makes it clear what version of Spout you need for whatever version of CB you're running).
     
  9. Offline

    JoshuaBehrens

    Then I'll take back my statement.
     
  10. Offline

    TMAsantos

    @Afforess
    like this ?

    Code:
    public void onBlockDamage(BlockDamageEvent event){
            if(event.getBlock().getType().equals(Material.SANDSTONE)){
                float blockDirt = MaterialData.getBlock(2).getHardness();
                if (plugin.permissionHandler.has(event.getPlayer(), "SpoutBlockMiner.SandStone")) {
                    MaterialData.getBlock(24).setHardness(blockDirt);
                }
            }
        }
    Its not working :S

    Thx for the help,
    TMAsantos

    @Afforess is this possible without SpoutCraft?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  11. Yes, but it won't correctly show the block break animation.
     
  12. Offline

    TMAsantos

    @tips48 I have Created the plugin, but its the same... the code is the one that ive posted above... is it wrong?
     
  13. That should theoretically work. System.out.pritnln(blockDirt); and paste it here.
     
  14. Offline

    TMAsantos

    i changed the blockDirt variable for 1, 2, 3 , 4, 5, 6... its the same... :S
    i will paste that here, wait a sec

    @tips48 result is 0.6 :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  15. Hmmm. not sure why! (@Afforess to the rescue :p)
     
  16. Offline

    Afforess

  17. Offline

    TMAsantos

    @Afforess Hummm... is not working with that build too :S
     
  18. Offline

    TMAsantos

    @Afforess are you going to fix this build? thx
     
  19. Offline

    TMAsantos

    UP, need help..
     
  20. Offline

    ZNickq

    @TMAsantos
    There are two s'es in Afforess!
    You need to do @Afforess ! ^^
    And i'll ask on the irc right now,but afaik,it's fixed!
     
  21. Offline

    TMAsantos

    @ZNickq Block Streght is not fixed @ the latest build xD
     
Thread Status:
Not open for further replies.

Share This Page