public boolean isOnPF (int marginx, int marginy) {
        if (!getTileBBox(temp_bbox_copy)) {
            temp_bbox_copy.x = (int) x;
            temp_bbox_copy.y = (int) y;
            temp_bbox_copy.width = 0;
            temp_bbox_copy.height = 0;
        }
        if (!pfwrapx) {
            if (temp_bbox_copy.x + temp_bbox_copy.width < -marginx) return false;
            if (temp_bbox_copy.x > pfwidth + marginx) return false;
        }
        if (!pfwrapy) {
            if (temp_bbox_copy.y + temp_bbox_copy.height < -marginy) return false;
            if (temp_bbox_copy.y > pfheight + marginy) return false;
        }
        return true;
    }