Why does the client crash if I create NPC in the following way? Server work perfectly, no log, no errors and NPC placed correct PHP: $position = '[some position]';$skin_file = $plugin->getDataFolder() . '/skins/invisible/invisible.png'; $img = @imagecreatefrompng($skin_file); $skinbytes = ""; $s = (int)@getimagesize($skin_file)[1]; for($y = 0; $y < $s; $y++){ for($x = 0; $x < 64; $x++){ $colorat = @imagecolorat($img, $x, $y); $a = ((~((int)($colorat >> 24))) << 1) & 0xff; $r = ($colorat >> 16) & 0xff; $g = ($colorat >> 8) & 0xff; $b = $colorat & 0xff; $skinbytes .= chr($r) . chr($g) . chr($b) . chr($a); } } @imagedestroy($img); $nbt = Entity::createBaseNBT($position, null, $yaw, $pitch); $nbt->setShort("Health", 20); $nbt->setString("MenuName", ""); $nbt->setString("CustomName", "NPC"); $nbt->setTag(new CompoundTag("Skin", [ new StringTag("Name", "Invisible"), new ByteArrayTag("Data", $skinbytes), new ByteArrayTag("CapeData", ''), new StringTag("GeometryName", ''), new ByteArrayTag("GeometryData", '') ])); $npc = Entity::createEntity("NpcHuman", $position->getLevel(), $nbt); $npc->setNameTag('NPC'); $npc->setNameTagVisible(true); $npc->setPosition($position); $npc->setRotation($yaw, $pitch); $npc->spawnToAll();