Problem With Material(Help-me if you can :)

Discussion in 'Plugin Development' started by dailison, Nov 7, 2015.

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

    dailison

    I need to set Effect for Green Wool Break:

    Correct Code(It's Work):
    Code:
    getWorld().playEffect(loc, Effect.STEP_SOUND, Material.WOOL);
    But i need the GREEN WOOL(THAT TEST NOT WORK):
    Code:
    getWorld().playEffect(loc, Effect.STEP_SOUND, Material.WOOL,DyeColor.GREEN.getData());
    How i can play that effect?

    I Have tried with ItemStack but not work.
    I need make Zombie Blood :)
     
  2. Offline

    mcdorli

    Why not use packets?
     
  3. Offline

    dailison

    How i can make that?

    Please give me a exemple.
     
  4. Offline

    MasterDoctor

    I don't know if you just typed this wrong, but here:
    Code:
    OL,Dye
    theres a comma (,) not a period (.)
     
  5. Offline

    teej107

    *facepalm*
     
  6. Offline

    dailison

    The first cody Work, the second i need help, the Material not have a DyeColor, that is the problem, i need another solution.

    For Red Blood i use Material.REDSTONE_BLOCK

    I need Green BLOOD, so I thought GREEN WOOL breaking effect

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  7. Offline

    teej107

    Does the REDSTONE_BLOCK breaking effect work?
     
  8. Offline

    MasterDoctor

    I meant when he typed it into the forums not the actual plugin
     
  9. Offline

    dailison

    Yes, this code WORK
    Code:
    getWorld().playEffect(loc, Effect.STEP_SOUND, Material.REDSTONE_BLOCK);
     
  10. Offline

    teej107

    Just looked at the JavaDocs for that method. The 3rd parameter is the data and the 4th parameter is the radius of the effect. I can't think/find the right data to use to send a green particle effect but try using an Emerald block instead.
     
    dailison likes this.
  11. Offline

    dailison

    /= I will try use that
     
  12. Offline

    Hugi21

    You must be use the ID of the material .

    example:
    Code:
    getWorld().playEffect(loc, Effect.STEP_SOUND, 152);
     
  13. Offline

    dailison

    It's soo good, but, how i can make a GREEN WOOL ID: 35:13?

    My Code:

    Code:
        @EventHandler
    public void receberDano(EntityDamageByEntityEvent e){
    if(e.getDamager() instanceof Player){
    e.getEntity().getLocation().getWorld().playEffect(loc, Effect.STEP_SOUND, 35);
     
  14. Offline

    mcdorli

    I don't think there is a way for that. Isn't there any other alternative you could use?
     
Thread Status:
Not open for further replies.

Share This Page