1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved CocoaBlock

Discussion in 'Development' started by Otorisan, Dec 25, 2018.

  1. Otorisan

    Otorisan Spider

    Messages:
    7
    GitHub:
    otorisanvardo
    In my server, we make some parkours which use CocoaBlock.
    CocoaBlock has many form.
    Then i use them.

    For instance, When i want use the small form of this block (ID:META = 127:4), i use "//set 127:4" on WorldEdit Plugin.
    However, a few moment passed, this CocoaBlock grows up.

    I thought over.
    "Dose the problem solve that it cancel BlockGrowEvent... ?"
    I tried canceling it.
    but it didn't solve.

    I thought over again.
    Deep thinking i tried.
    "The better way is to cancel BlockUpdateEvent!!!!"
    I tried canceling it.
    BUT! the CocoaBlock didn't response my hoping.

    How do i do it?
    I want you to advise.:(


    My code:

    PHP:
    public function onGrow(\pocketmine\event\block\BlockGrowEvent $event) {
        
    $block $event->getBlock();
        if (
    $block->getId() == 127$event->setCancelled();
    }

    public function 
    onUpdate(\pocketmine\event\block\BlockUpdateEvent $event) {
        
    $block $event->getBlock();
        if (
    $block->getId() == 127$event->setCancelled();
    }
     
  2. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Cocoa blocks tick randomly. You can stop them from growing by configuring it in pocketmine.yml.
    PHP:
    chunk-ticking:
      
    disable-block-ticking:
        - 
    127
     
  3. Otorisan

    Otorisan Spider

    Messages:
    7
    GitHub:
    otorisanvardo
    Thanks Muqsit!!
    CocoaBlock was responsed my hoping!!
    Hot DOG!!
     
    Muqsit likes this.
  4. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
    Alternatively, just don't use dev builds, since that's the only place you'll find working cocoa pods.
     
    AZETURKbro and Muqsit like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.