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

Solved Entity Error

Discussion in 'Plugin Help' started by ByAlperenS, May 15, 2020.

  1. ByAlperenS

    ByAlperenS Spider Jockey

    Messages:
    26
    GitHub:
    ByAlperenS
    Error;

    TypeError: "Argument 2 passed to pocketmine\entity\DataPropertyManager::setFloat() must be of the type float, null given, called in phar:///root/PocketMine-MP.phar/src/pocketmine/entity/Entity.php on line 616" (EXCEPTION) in "src/pocketmine/entity/DataPropertyManager" at line 87

    Code;

    Code:
    $nbt = Entity::createBaseNBT(new Vector3($p->getX(), $p->getY(), $p->getZ()));
                $nbt->setTag(new CompoundTag("Skin", [
                    new StringTag("Data", $skin->getSkinData()),
                    new StringTag("Name", "Standard_CustomSlim"),
                    new StringTag("GeometryName", "geometry.alex"),
                    new ByteArrayTag("GeometryData", file_get_contents($this->getDataFolder() . "geometry.json"))
                ]));
                $nbt->setTag(new IntTag("position"));
                $nbt->setTag(new StringTag("player", "0"));
                $npc = new CeoEntity($p->getLevel(), $nbt);
                $npc->spawnToAll();
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    You need to set width and height of your custom entity
     
    HimbeersaftLP likes this.
  3. ByAlperenS

    ByAlperenS Spider Jockey

    Messages:
    26
    GitHub:
    ByAlperenS
    Thanks Bro. I forget
     
  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.