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

Legacy Item ID Problem

Discussion in 'Development' started by RiseMCPE, Jul 6, 2021.

  1. RiseMCPE

    RiseMCPE Spider

    Messages:
    14
    I was writing a plugin but I couldn't solve this problem. My problem is that the ids of the items are the same. The id for each wood is the same. I couldn't find how to separate them. Can you help me?

    PHP:
    $item Item::get(Item::LOG);
                        if(!
    $o->getInventory()->contains($item)){
                        
    $o->sendPopup("§cEnvanterinde bu öğeden bulunmamaktadır.");
                        return 
    false;
                        }
                        
    $this->OakWood($o);
                        return 
    true;

    $item Item::get(Item::LOG);
                        if(!
    $o->getInventory()->contains($item)){
                        
    $o->sendPopup("§cEnvanterinde bu öğeden bulunmamaktadır.");
                        return 
    false;
                        }
                        
    $this->BirchWood($o);
                        return 
    true;
    Oak wood working but others wood dont working. Help me.
     
  2. RiseMCPE

    RiseMCPE Spider

    Messages:
    14
    From what I've looked, most items don't have a legacy item id. Can we change the legacy id to normal id for this?
    Like;
    PHP:
    $item Item::get(Item::LOG);

    $item Item::getID("17");
     
  3. Taco

    Taco Spider Jockey

    Messages:
    41
    GitHub:
    taconoburrito
    $item = Item::get(id, damage, count);
     
    minijaham likes 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.